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.
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