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

Issue when connecting to Web.Contents in service

Hi,

 

i get my data by requesting premade CSV documents from our web application in the Desktop app using the following connection:

= Web.Contents("https://web app service url",[Headers=[#"apiKey"="some api key"],Timeout=#duration(0, 0, 5, 0)])

This works as the desktop request is processing the specified headers in the request and therefore allowing this as an auth method.

However when i export the datasets to the service no connection is possible anymore and i can't schedule any refresh.

There is not even an option to set any connection headers and i have to assume the setting from the desktop app is not transferred.

 

Question: Is this planned to be implemented later on or did i miss some other way to use it?

 

Since the service currently allows basic http auth, we implemented this as a work around for the time being.

However also with this method i can't get it to work sadly.

Problem here starts with the desktop application already:

1. Auth request is sent:

Request:
GET app_url HTTP/1.1
Accept: */*
User-Agent: Microsoft.Data.Mashup (https://go.microsoft.com/fwlink/?LinkID=304225)
Authorization: Basic username:password
Accept-Encoding: gzip, deflate
Host: app_url
Connection: Keep-Alive

2. Response from server 302 - redirects to the service url again

3. Desktop app requests the service url, but without using session cockie therefore receiving forbidden.

Do we need to put the CSV directly in the response without redirect in order for this to work with the basic auth?

Anyone using a similar approach maybe and could share their experience?

 

cheers!

 

 

3 REPLIES 3
Anonymous
Not applicable

Hi @JulianS,

 

Did you use custom functions in query editor? If this is a case, currently custom function only works on desktop side, it not works on service side.

 

Regards,

Xiaoxin Sheng

Hi, no custom functions were used.

It's working with the basic http authentification now in the service, since we implemented that as a workaround.

However i'd still like to know if we can use any http header based authentification in the service in the near future.

Anonymous
Not applicable

Hi @JulianS,

 

Web.Content support this parameter, but you should ensure the service which you requested if it support "authentication" parameter.

 

Regards,

Xiaoxin Sheng

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.