Forum Discussion
aTChris
1 year agoResolver I
All models within a workspace using the same credentials
I have created and published 5 reports within a workspace. Each report is almost the clone of the other with the differnce being the credneitals of the API. The SaaS platform we query distinguishes b...
- 1 year ago
I think I found a solution. I dont like the fact I have to make credentials visible in the code but it works in PBID and the app service.
let // Your username and password Username = BasicAuthUsername, Password = BasicAuthPassword, // Encode the credentials Credentials = Binary.ToText(Text.ToBinary(Username & ":" & Password), BinaryEncoding.Base64), // URL of the web source SourceUrl = "https://www.example.co.uk", // Retrieve the data with authorization header Source = Json.Document( Web.Contents(SourceUrl, [ Headers = [Authorization = "Basic " & Credentials] ]) ), // Retrieve the data with authorization header Records = Source[Records],
aTChris
1 year agoResolver I
It certainly appears that is the issue. Im now having to look at how to pass the creds within the file as a param.
I would say this is a shortcoming of the platform. Credentials should be report or model specific not workspace. We can see they thought of this in PowerBI Desktop considering these options and I am sure it used to work but I expect the by product of another idea has caused this issue.