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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jasonyeung87
Helper V
Helper V

Enter credentials for Web API when publishing to Power BI Service

Hi,

I created a report on Power BI desktop which grabs data from an API. I use the "Web" data source and enter the Web API key as the credentials. It connects to the API and I'm able to generate various visualizations.

 

I publish this report to Power BI Service and want to schedule a data refresh every day. I need to enter my credentials, but it's not giving me an option to enter a Web API key.

 

Power BI authentication.jpg

It only gives me the Anonymous, Basic and OAuth2 authentication methods. I tried Basic and a user's account, but it doesn't work. I was wondering how do I set theauthentication method to Web API Key in Power BI Service?

 

1 ACCEPTED SOLUTION
nitishsh91
Solution Supplier
Solution Supplier

Hi @jasonyeung87 

 

Please go through below link, I believe it should help you in sorting out this problem:

https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/amp/

View solution in original post

4 REPLIES 4
nitishsh91
Solution Supplier
Solution Supplier

Hi @jasonyeung87 

 

Please go through below link, I believe it should help you in sorting out this problem:

https://blog.crossjoin.co.uk/2014/03/26/working-with-web-services-in-power-query/amp/

Hi,

 

I tried using basic authentication, but adding the API key (instead of the user name). I was able to make the connection. I think it is the nature of the REST API that I was using. I thought it needed to be the Web API authentication method. I'll mark your solution as accepted.

 

Hello, Could you please show step-by-step how you did? 

Thanks

Hi,

 

thanks for the link. I tried the suggestions in the link by adding the headers in the code. But it seems to not connect. I get the error "We couldn't authenticate with the credential provided". error.

 

The credential (API Key) was changed recently.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.