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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
mhundley
New Member

Updating API Key

One of my data sources updated the API key and I need to update in the credentials in PBI web, but don't see where to update this under settings. I click on Data Source Credentials then Edit Credentials, but there is not a place for me to update API Key. 

7 REPLIES 7
v-shchada-msft
Community Support
Community Support

Hi @mhundley,

We would like to check whether your issue has been resolved. Kindly let us know if you require any further assistance.

Thank you.

v-shchada-msft
Community Support
Community Support

Hi @mhundley,
 

Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to the @SamInogic   for sharing valuable insights. 
 

Could you please confirm if your issue has been resolved using the suggested approach? This will help other community members facing similar scenarios. 
 

Thank you.

SamInogic
Solution Sage
Solution Sage

Hi,

 

This happens because your connection is not set to Web API type.

 

In Power BI Service, the API key box only appears if the data source is using Web API authentication. If it was set up as Anonymous or something else, you won’t see the API key field.

 

Simple fix:

 

  1. Go to Settings → Dataset → Data source credentials
  2. Click Edit Credentials
  3. Click Sign out / Clear permissions
  4. Connect again and choose Web API
  5. Enter your new API key

 

If it still doesn’t show:

 

  • Open the file in Power BI Desktop
  • Go to Data Source Settings
  • Clear permissions and reconnect with the new key
  • Publish again

 

Most of the time, just clearing and reconnecting fixes it.

 

Hope this Helps!!

 

Thanks!

 

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/

Thank you for the info. When i do this, I get the following error:

"A web API key can only be specified when a web API key name is provided"

Any suggestions?

Hi,

 

That error means Power BI is expecting both a key and a key name, not just the value.

 

In Power BI Service, when you choose Web API, it needs:

  • Key → your API key
  • Key name → the parameter/header name the API expects

 

For example:

  • If your API uses ?api_key=XXXX → key name = api_key
  • If it uses ?key=XXXX → key name = key

 

What to do:

  1. Go back to Edit Credentials
  2. Select Web API
  3. Enter:
    • Key = your API key
    • Key name = the parameter name used by your API

 

Once both are filled, the error should go away.

 

Hope this helps.

 

Thanks!

 

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/
Shai_Karmani
Resolver II
Resolver II

Hey

My guess is that you don't see the API Key in Edit Credentials because its not stored there, it's hardcoded in the dataflow's M query. That dialog only shows a key if the source was set up with Web API auth. If it's Anonymous, nothing shows.

To update it,  edit tables, open the query, go to Advanced Editor, and update the key inside the Web.Contents call, either in the URL or headers. Then save and refresh.

If you want it manageable via Edit Credentials next time, switch to Web API auth using ApiKeyName and re-enter the key there.

Also make sure you’re editing the dataflow itself, not a dataset by mistake.

 

If that was helpful please give a thumb up and mark  it as resolved. 

Thank you 😊 

Thanks for the info. When I try to do this, it is telling me I have invalid credentials and takes me back to enter them in Data Source Settings window. Any ideas? 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon & SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.