Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi everyone,
I have a dataset in Power BI Desktop that uses the following M code to retrieve paginated data from the API. It works perfectly in Desktop — all pages are fetched using Web.Contents with RelativePath and Query parameters.
let
BaseUrl = "https://app.xxxxx.com ",
Endpoint = "api/v2/employees",
GetPage = (PageNumber as number) =>
let
Source = Json.Document(Web.Contents(BaseUrl, [
RelativePath = Endpoint,
Query = [
page = Number.ToText(PageNumber),
size = "100"
]
])),
Bron = Source[items],
Data = Table.FromRecords(Bron)
in
Data,
FirstPage = Json.Document(Web.Contents(BaseUrl, [
RelativePath = Endpoint,
Query = [
page = "0",
size = "100"
]
])),
TotalPages = FirstPage[totalPages],
PageNumbers = List.Numbers(0, TotalPages),
CombinedData = Table.Combine(List.Transform(PageNumbers, each GetPage(_)))
in
This setup works flawlessly in Power BI Desktop. However, once I publish the dataset to the Power BI Service and try to refresh it, I get the following error:
The credentials provided for the Web source are invalid. (Source at https://app.xxxxx.com/api/v2/employees .)
In the Power BI Service, the credentials are correctly configured as Basic Authentication for https://app.xxxxx.com/ , and the data source appears correctly under dataset settings. Yet it seems that the credentials are not being sent with the actual API calls in the Service.
What I’ve tried:
My suspicion:
Power BI Service does not send Basic Authentication headers when using Web.Contents with RelativePath and Query, even when credentials are set at the root domain level.
My questions:
Any help or confirmation of this behavior would be greatly appreciated.
Thanks in advance!
Solved! Go to Solution.
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 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 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
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi @Arnoh
I wanted to check if you had the opportunity to review the information provided by @Akash_Varuna and @rohit1991 . Please feel free to contact us if you have any further questions. If their response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.
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
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
Hi @Arnoh
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @Arnoh It might be because Power BI Service doesn’t send Basic Authentication headers with RelativePath. Combine the full URL in Web.Contents, or include the Authorization header with Base64-encoded credentials. Another thing you could try is setting credentials for the exact API endpoint instead of the root domain. I think this is a known limitation, so avoid RelativePath and use full URLs or custom headers for consistency.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.