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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
EdwngJs
Regular Visitor

Data source credential for WEB API Power Bi Service

Hello,

I created a report in Power BI Desktop that retrieves data from an API. I use the "Web" data source and input the Web API key as my credentials, allowing me to connect to the API and create different visualizations.

When I publish the report to Power BI Service and try to set up a daily scheduled data refresh, it prompts me to enter my credentials. However, it doesn’t provide an option to input a Web API key.

 

EdwngJs_0-1730511892371.png

EdwngJs_1-1730511970380.png

 

Thanks in advance!

 

2 REPLIES 2
SaiTejaTalasila
Super User
Super User

Hi @EdwngJs ,

 

Hardcode or use parameters and pass your username & password or API Key in your m-query and use ananymous authentication type.

If you are seeing dynamic datasources issue please refer below article and fix it. 

https://teklink.com/knowledge-center/relativepath-query-option-in-power-bi/#:~:text=RelativePath%20%....

 

I hope it will be helpful.

 

Thanks,

Sai Teja 

rajendraongole1
Super User
Super User

Hi @EdwngJs -  Unfortunately, Power BI Service does not natively support API key authentication in the same straightforward way as Power BI Desktop.

In Power BI Desktop, set up a parameter for the API key and reference it in your query.

When publishing to the Power BI Service, this may allow you to update credentials more easily. Unfortunately, this approach doesn’t always solve the issue if Power BI Service still doesn’t recognize the API key parameter for scheduled refreshes.

Set up an Azure Logic App or Power Automate flow to connect to the API. The flow can handle the API authentication using the API key.

Then, connect Power BI to the Logic App or Power Automate endpoint instead of directly connecting to the API. This workaround helps avoid the credential issue and allows Power BI to refresh the data by calling the Logic App URL instead.

If your API also supports basic authentication (username and password) or another form of authentication supported by Power BI Service, you could switch to that method, as Power BI Service supports basic and OAuth authentication types.

Learning module FYR

Azure Logic App Integration with Power BI 

You can also refer to this video to learn how to publish data from Azure Logic Apps to a Power BI live streaming dataset.

Azure Logic Apps and Power BI Real-Time Streaming Datasets 

 

 

 

 

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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