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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Trotter
Helper I
Helper I

Data source credentials required on power BI service for an API with a key

Hi

 

I have set up a report in power BI desktop that uses an API with a key as its data source.

When I publish the report in power BI service how do I input the credentials?

It does not seem to give me an option to add a key and I have not managed to find any notes on how to do this.

 

Details:

In desktop I connected to the API but selecting:

  • Get data
  • From Web
  • Advanced
  • Addted the URL for API at the top
  • Under HTTP request header parameters I input: "Ocp-Apim-Subscription-Key" in the first box followed by the key in the 2nd box.

When I publish and go to the data source credentials I cannot see any option that lets me input the key.

 

How can I input the credentials required so that the report will refresh?

 

Thanks

 

Regards

 

Trotter

1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. Reading your comment it looks like the credentials are written at the code in the header of the request. That means you are not using powerbi credentials (auth2, basic, windows, etc). When editing the credentials look for "Anonymous" category. Power Bi Service will asume that it doesn't need credentials for running the request because it's a public request or they already are in the power query code.

I hope that helps,


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

Happy to help!

LaDataWeb Blog

View solution in original post

2 REPLIES 2
ibarrau
Super User
Super User

Hi. Reading your comment it looks like the credentials are written at the code in the header of the request. That means you are not using powerbi credentials (auth2, basic, windows, etc). When editing the credentials look for "Anonymous" category. Power Bi Service will asume that it doesn't need credentials for running the request because it's a public request or they already are in the power query code.

I hope that helps,


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

Happy to help!

LaDataWeb Blog

Thanks @ibarrau 

 

I've tested on one of the APIs and that worked!!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.