Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I'm using PowerBI to retrieve data from a REST API, and this works fine on Desktop but fails to refresh (either scheduled or manual) on Service, using Anonymous access.
The code is
auth = "Basic " & Binary.ToText(Text.ToBinary("user:pwd", BinaryEncoding.Base64)), fields = "{""result"":""*""}", url = "https://<url>", Source = Json.Document(Web.Contents(url, [Query=[pageNumber="1", limit="2000", sort="key(DS)"], Headers=[Authorization=auth,Fields=fields]])),
I am able to refresh a different data source using Basic auth with the same username/password, however I need to use the [fields] option to define which fields the response should return - so I need the Anonymous.
Solved! Go to Solution.
Hi @brunborg ,
I think it's this error is not releated to the headers (fields). Basically the autentication is you are handling with your side using your own Basic Autentication from the Power Query. If you choose the Anonymous it will override all the autentication in your report. Can you just try to use a gateway for your case ?
Using the gateway,there is an option called Skip Connection.
You can also follow my article for the reference, which I've dealt with the same sort of process.
Hi @brunborg ,
I think it's this error is not releated to the headers (fields). Basically the autentication is you are handling with your side using your own Basic Autentication from the Power Query. If you choose the Anonymous it will override all the autentication in your report. Can you just try to use a gateway for your case ?
Using the gateway,there is an option called Skip Connection.
You can also follow my article for the reference, which I've dealt with the same sort of process.
Thanks for posting this solution I managed to refresh in power bi service only time will tell if the fresh data will pull through but have been working on this issue for days,
the blog post says when you enter your credentials in settings then you are overiding your authentication method in power query, so you need to create a gateway connection with skip test selected.
Thank you, very helpful!
User | Count |
---|---|
45 | |
32 | |
30 | |
27 | |
25 |
User | Count |
---|---|
55 | |
55 | |
35 | |
33 | |
28 |