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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
albabae
New Member

Authenticating OData.Feed using Web API difficulty

I'm in Excel and Power BI. I made my own backend api service that provides data in OData format... That all works great.

 

I can use the basic authentication just fine. But I want to also be able to use the "Web API" authentication method, but it keeps telling me to provide api key name... 

note the "A web api key can only be specified when a web api key name is provided" warning message

albabae_0-1774543455253.png

 

 

I know this can be circumvented by using M code like this or this but I still think it would be even easier if the GUI had a section for the apiKey name or if it defaulted to a value... Does that make sense?

1 ACCEPTED SOLUTION
albabae
New Member
4 REPLIES 4
albabae
New Member

V-yubandi-msft
Community Support
Community Support

Hi @albabae ,

Thank you for engaging with the Microsoft Fabric Community. This issue is happening because Power BI’s Web API option needs both the API key and the key name. But in the UI, there’s no place to enter the key name, so it throws that error.

That’s why it works with Basic auth but not with Web API. As a workaround, you can use M code and pass the API key manually either in headers or as a query parameter. That gives you full control and avoids this limitation.

If you manage the API, you can also allow the key in headers, which works more smoothly with Power BI.


I hope this clarifies the situation. If I’ve misunderstood any part of your situation, please let us know.

Yes. Thank you. This is seeming like the current workaround. But it's kindof a hassle. If you can expand on 

> you can also allow the key in headers, which works more smoothly with Power BI.

That would be appreciated. I currently allow headers like "Bearer token" or "x-api-key" request header.  I also allow basic auth and url query parameter.

 

Also where would I go to suggest such a feature in the UI, to have the api key name?  I found giving feedback to microsoft for power bi is kinda difficult and a hassle.

Hi @albabae ,

You can share your feedback on the Fabric Ideas portal here: Fabric Ideas - Microsoft Fabric Community.

The product team regularly reviews suggestions there and considers them for future improvements.

 

Thanks.

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.