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
naelske_cronos
Advocate II
Advocate II

REST API - Basic authentication UI stored in HEADER

Hello,

 

Little bit of a weird but a small question.

In my function Web.Contents I make a call to an URL which is a simple login page. If you go to the login page when opening the URL it works without error and shows a simple status code like 200. If in Power BI I use anonymous as authentication it works, but it also works when I use basic authentication with a username and password. When I use anonymous my RelativePath won't work because it requires basic authentication to call the API.

  • I know that Power BI service does some static analysis in which it first evaluates my root URL with the credentials I use, so here "https://BLUH.ionbiz.com" with the basic authentication (which is actually not needed). If it works then it will execute the rest of the parameters in Web.Contents so my RelativePath and Query. My question is now, does it store the basic authentication credentials afterwards in my header to call my RelativePath where basic authentication is actually needed?
let
    HTTPHeader = [RelativePath = "api/Plannings/GetList", Query = [page="0", pageSize="0", departmentShortName="", departmentExternalCode="", resourceId="", dateFrom="", dateTo="", projectId="", taskId="", lastModifiedDate=""], Headers = [#"Content-Type"="application/json"]],
    GetPlannings = Json.Document(Web.Contents("https://BLUH.ionbiz.com", HTTPHeader))
in
    GetPlannings 

 

Kind regards

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @naelske_cronos ,

 

Hope this article can help you.

http://angryanalyticsblog.azurewebsites.net/index.php/2016/05/16/api-strategies-with-power-bi/

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Hello,

 

This didn't really answered my question but thank you for trying to help me.

 

 

Kind regards

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors