cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JulianS Regular Visitor
Regular Visitor

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 usernameSmiley Tongueassword
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
Community Support Team
Community Support Team

Re: Issue when connecting to Web.Contents in service

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

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
JulianS Regular Visitor
Regular Visitor

Re: Issue when connecting to Web.Contents in service

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.

Community Support Team
Community Support Team

Re: Issue when connecting to Web.Contents in service

Hi @JulianS,

 

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

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 108 members 1,439 guests
Please welcome our newest community members: