Forum Discussion
Power BI Service not sending Basic Authentication with Web.Contents using RelativePath
- 1 year ago
Hi Arnoh ,
Great to hear you identified the root cause! When visuals show “Visual has pending changes” and require manual refreshing after a dataset update, it’s often due to the "Pause visuals" setting under the Optimization pane being enabled. This feature is helpful when working with large models or making several changes, as it temporarily suspends visual updates for performance, but can be confusing if toggled unintentionally. If anyone else encounters this issue, simply go to the “Optimize” ribbon in Power BI Desktop and uncheck “Pause visuals.” Once deselected, your visuals will resume auto-refreshing as expected after dataset updates. Also, keeping Power BI Desktop updated and clearing the cache occasionally can help avoid unexpected behavior. - 1 year ago
Hi it seems to be an issue in the power bi service. But there is a workaround you can make a connection inside the power bi service instead of entering the credintials in the workspace.
Hi Arnoh ,
Great to hear you identified the root cause! When visuals show “Visual has pending changes” and require manual refreshing after a dataset update, it’s often due to the "Pause visuals" setting under the Optimization pane being enabled. This feature is helpful when working with large models or making several changes, as it temporarily suspends visual updates for performance, but can be confusing if toggled unintentionally. If anyone else encounters this issue, simply go to the “Optimize” ribbon in Power BI Desktop and uncheck “Pause visuals.” Once deselected, your visuals will resume auto-refreshing as expected after dataset updates. Also, keeping Power BI Desktop updated and clearing the cache occasionally can help avoid unexpected behavior.
- jimbob22851 year agoAdvocate IV
Hi All
I've encountered the very same problem
- And the solution for me, which florianh suggested in this thread: Failed to update data source credentials
- Was to tick "Skip Test Connection" when editing the Data Source Credentials
- I'm guessing that because of the way the URL is constructed in the M code, to bring back and combine all the paginated pages
- That the Power BI Service only supplies the base URL when testing the connection
- Which will obviously fail, as it doesn't contain the API Key
- So, I presume skipping the test connection lest you set up the credentials
- Which then work correctly when refreshing the data set, as the full url, with the API Key, is passed to the API
Can any of the experts on here clarify that this is the accepted solution to this problem?
Also, why is there a response in this thread about Paused Visuals, where did that come from, as it seems to have nothing to do with the original question?
I've also added my M code below, if that helps anyone else reading this thread - Credit to v-ssriganesh, BA_Pete and v-dineshya for helping to adapt my original code in to a working solution
Cheers
Jim
let // Base URL and parameters BaseUrl = "https://api.XXXXX.com", ApiToken = "ABCDEFGHIJKLMNOPQRSTUVWXYZ", Limit = 500, InitialStart = 0, // Function to fetch one page of results GetPage = (Start as number) => if Start = null then [Data = {}, More = false, NextStart = null] else let // Url = BaseUrl & "start=" & Text.From(Start) & "&limit=" & Text.From(Limit) & "&api_token=" & ApiToken, // Response = Json.Document(Web.Contents(Url)), Response = Json.Document( Web.Contents( BaseUrl, [ RelativePath = "/v1/organizations?", Query = [ start = Text.From(Start), limit = Text.From(Limit), api_token = ApiToken ] ] ) ), Data = Response[data], More = try Response[additional_data][pagination][more_items_in_collection] = true otherwise false, NextStart = try Response[additional_data][pagination][next_start] otherwise null in [Data = Data, More = More, NextStart = NextStart], // Loop through all pages using List.Generate AllPages = List.Generate( () => [Result = GetPage(InitialStart), Continue = true], each [Continue], each [ Result = GetPage([Result][NextStart]), Continue = [Result][More] ], each [Result][Data] ), // Flatten all results into one list Combined = List.Combine(AllPages), // Convert to table, automatically detecting columns RawTable = Table.FromRecords(Combined) in RawTable - Elipum5 months agoRegular Visitor
Has any body found a working solution yet?
I am having a similar issue.
In my case, apikey authentication needs to be passed at
https://app.xxxxx.com/api/company1
Or https://app.xxxxx.com/api/company2
Because I have to combine data from multiple sources that require different API keys.
I overcome the dynamic URL issue that prevented refresh by using webcontents instead of Baseurl, and the relative path approach.
My dataset contains many many endpoints. Fx. https://app.xxxxx.com/api/company1/employees
Per each of the companies I am joining in the model.
I started getting the error of missing credentials at root, so I set it as Anonimous.
Now I am getting the error of missing credentials at end point, so I created a query to use as anchor mentioning every single url I use in the model. Not ideal because I need to remember to add new endpoints if I ever need one extra, and they are already a lot!
I then defined credentials in Source settings in desktop for each of this endpoints, which now appear in the sources list (they inherited password from the sources I already had for https://app.xxxxx.com/api/company1 anyways
Well ... it is not working.... it still claims credentials are missing for each endpoint url. I already set the root test to skip, which is the only url recognised at Gateway.
Any other ideas?