Forum Discussion
How to specify HTTP request header parameter in Power BI service
Hi everyone,
In Power BI Desktop I can connect to Web specifying HTTP request header parameter:
I need my report to get updated in Power BI service as well. The issue is there seems to be no means for setting HTTP request header parameter which is mandatory in my case.
What are my options? What can be done to set it?
Any comments are appreciated.
Hi Sergiy,
I see you're trying to get data from the Power BI API by writing your own M code in the Power Query Editor - this is not going to work unfortunately, because it is not possible to work with APIs that use OAuth2 authentication in this way. The only way to get data from an API that uses OAuth2 authentication is by creating a custom connector; there is a reasonably easy way to do this that I describe here https://blog.crossjoin.co.uk/2018/11/13/openapi-power-bi-rest-api-m/ and I think other people have blogged about this too.
HTH,
Chris
7 Replies
- SergiyResolver II
to be correct - I specify HTTP request header parameter in my M code but that is not enough apparently.
Something is missed.
- SergiyResolver II
I think this article explains what is happening:
The auther says:
For cloud data sources connecting to a URL, a test connection is performed against the root URL. This may be a blocker where the URL contains authentication keys, for example. Enabling Skip test connection also helps in such scenarios.
OK, but there is no such option "Skip test connection" visible.
The article starts saying:
we have temporarily disabled the “skip test connection” feature
Is it really disabled now and I have to wait, or there never were such an option in a window whose screen I provided?
- AnonymousNot applicable
Hi Sergiy ,
You can setting query parameter to parametrized your connection string:
Edit parameter settings in the Power BI service
In addition, I'd like to suggest you add 'relativepath' optional parameter to web connector to prevent anonymous credentials not valid issues.
Sample:
Source= Json.Document(Web.Contents("https://api.powerbi.com", [Headers=[Authorization=parameter],RelativePath="/v1.0/myorg/groups"]))Regards,
Xiaoxin Sheng
- marcel1318New Member
Hello! did you get any solution to this problem? i have the same one im trying to add the HTTP request
to the updated link