Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Connect to Rest API Basic Auth

Hey everyone,

 

I´m trying to connect to an api.

 

This is working:

grafik.png

 

When i try to use the PowerBi Basic authentification the querry will be:

grafik.png

 

I have set my data settings sources to:

grafik.png

 

This wont work.

 

This is what the api tells me to set as the auth settings:

 

So I have added a :after my mail adress.

 

What am I doing wrong here?

What key does PowerBi create?

 

Thanks in advance

Luis

 

6 REPLIES 6
dax
Community Support
Community Support

Hi @Anonymous ,

If you don't add ":" at the end of username , will it work well? You could try to clear the permission in datasource setting, then try this again to see whether it work or not. You also need to check whether the basic authentication could access the database. I am not sure whether this is limit for that api, so I also suggest you could use token to access this.

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Anonymous
Not applicable

hi @dax and @ImkeF 

 

I´m super sorry i posted twice yesterday but i go a little confused because my first post disappeared...

 

grafik.png

 

This is working in postman (with the additional : after the mail adress)

 

I assumed that:

grafik.png

does the same but it doesn´t. Also somehow i cant track that one in fiddle.

 

Regards,

Luis

 

Hi @Anonymous 

to use the solution I've posted in the other thread, you'd have to select "anonymus Authentication" here and supply the credentials in the header instead like described in the link below:

Hi @luiTre 

basic authentication isn't natively supported for Web.Contents. But there seems to be a workaround (see here: https://social.technet.microsoft.com/Forums/office/en-US/11d4347c-0332-4dea-b270-a2dcd911c8b0/passin...) although I've never tried it.

Using Basic Auth as you did will definitely not work for web sources.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Anonymous
Not applicable

Hi @ImkeF ,

 

it´s working when i pass the credentials in the header.

What i don´t understand:

Isn´t the Basic Auth I´m using in Postman the same Basic Auth i use in PowerBi?

 

Regards,

Luis

Hi @Anonymous ,

No, the Basic Auth through the UI in PBI is different (that's the reason why it doesn't work). But I don't know the technical details behind it.

 

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Anonymous
Not applicable

 

Somehow the app doc didnt load:

grafik.png

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors