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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
tejakpa
Regular Visitor

Creating custom HTTP request header with WebApi as datasource

Hi,

 

I have an WebAPI that is secured with Windows authentication. I am trying to add custom header parameter (and value) when connecting to the API but get an error as shown in the screenshot. Is building a custom request header supported in PowerBI desktop (I know people have done it with a query but i'm not interested in such error-prone process). What are my options?

 

Capture.PNG

2 REPLIES 2
Anonymous
Not applicable

Hi @tejakpa,

 

Can you share us your formula to test? It will be help for troubleshooting.

 

BTW, the parameters which used in http header should match the config of api, if you use a unknown parameter it may caused the issue.

 

Reference link:

M Query to use POST method on a Web API


Regards,

Xiaoxin Sheng

As I said in my original query, I am not interested in typing the request body and come up with a 'formula'. I see that power BI allows adding optional header parameters (in 'advanced' options tab after selecting 'web' as datasource before making the api call so I would just like to add the key-value pairs and have it work out of the box. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.