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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I'm struggling with configuring the refresh in Power BI service.
This code works well with Power BI Desktop. When I published my report on the service, I got an issue since I can't configure and refresh the dataset.
In my M query, I created 1 function to get the access Token, and 1 call API to get the historical refresh on one Dataset.
In Power BI Service :
I could initialized the getAccessToken. But the API call should not be initialize since it is using the generated token.
In the "data source credentials" field, I tried to configure the credential API call with anonymous but it does not work. So I checked the "skip test the connection".
I did not try to connect with Basic connection type because it is based on the generated token...
This is my error below when I try to refresh :
The Error :
{"error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","pbi.error":{"code":"DM_GWPipeline_Gateway_MashupDataAccessError","parameters":{},"details":
[ {"code":"DM_ErrorDetailNameCode_UnderlyingErrorCode",
"detail":{"type":1,"value":"-2147467259"}},
{"code":"DM_ErrorDetailNameCode_UnderlyingErrorMessage",
"detail":{"type":1,"value":"<pi>Web.Contents with the Content option is only supported when connecting anonymously.</pi>"}},
{"code":"DM_ErrorDetailNameCode_UnderlyingHResult","detail":{"type":1,"value":"-2147467259"}},
{"code":"Microsoft.Data.Mashup.ValueError.DataSourceKind","detail":{"type":1,"value":"Web"}},
{"code":"Microsoft.Data.Mashup.ValueError.DataSourcePath",
"detail":{"type":1,"value":"https://login.microsoftonline.com/24139d14-c62c-4c47-8bdd-ce71ea1d50cf/oauth2/v2.0/token"}},
{"code":"Microsoft.Data.Mashup.ValueError.Reason","detail":{"type":1,"value":"DataSource.Error"}}],"exceptionCulprit":1}}}
Table: powerbi_belgique_getRefreshedHistory.
Do you have any ideas on why it does not work ?
Thank you
Kevin
Solved! Go to Solution.
Thank you @GilbertQ for your reply.
I found the solution, I made a mistake in configuring the MS Token with my own credential....
I should have configured with the anonymous type.
Kevin
Hi,
I have a requirement of getting dynamic API url data from GitHub to Power BI. The requirement is getting all the tfsec job failures in all the repos(nearly 1000 repos) and visualzing the count to end user. By using invoke function in Power query I am getting them loaded to Power query but I am unable to get the same data to Power BI desktop (and also it is loading forever). Kindly advise if there is better way of plling GitHub API data into Power BI desktop.
Hi @k-vinh95
The challenge is that the Token changes after 1 hour as it expires so that is why it is not working. For the login I would suggest setting up a service principal and using this to log in?
Thank you @GilbertQ for your reply.
I found the solution, I made a mistake in configuring the MS Token with my own credential....
I should have configured with the anonymous type.
Kevin
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!