March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I was trying to update the data source credentials through REST API (https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId}) for a PBI report whose data source tpye is "Web" and it is from a CSV file on SharePoint site. I chose "OAuth2" as credential type in the body but got errors as below:
It says the credentials for the web source are invalid.
However I used the same credential type and same token for another PBI report (data source type is "SharePoint List" and they are pointing to the same sharepoint site), and the REST API call was made successfully.
Could anyone tell me what's missing during this operation for the websource or is there anything I can do to make the call succeed.
Hi @kevinglb , @v-shex-msft ,
I have exactly the same issue. I'm pretty sure it's because we don't patch a "refresh token" with the credential API. When we refresh the dataset, I think it it takes more that x minutes, Power BI Services wants to refresh the token with an access token. Since we didn't put an access token (not supported with the API), it fails.
That's pretty annoying because I have no workaround in mind right now...
We experience issue when we are trying to refresh the PBI report through REST API call: https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshesThe data source for the report is from SharePoint, so it needs data source credentials, we used https://api.powerbi.com/v1.0/myorg/gateways/{gatewayId}/datasources/{datasourceId} to update the credentials by passing access token, and the call succeed, and we can see there is no waning message showing up for that dataset at app.powerbi.com, which means the credentials are updated.
Please let me know whether this is a known issue or not and what should I do to make the credentials updated and valid for the report refresh operation.
Hi @kevinglb,
How did you config 'get data' operations from that data source? Can you please share some more detail to help us clarify and troubleshoot your scenario?
How to Get Your Question Answered Quickly
In addition, you can take a look at the following link to directly get data from the link of the files that are stored in onedrive/sharepoint:
Use OneDrive for Business links in Power BI Desktop - Power BI | Microsoft Docs
Regards,
Xiaoxin Sheng
Hi Xiaoxin,
Do you have any progress on this issue?
Regards,
Hi Xiaoxin,
Followings are the steps that I used to get data from SharePoint:
3. Build visualization model based on the data just loaded and save locally
And I also tried the way you suggested through the link to get data by enter the URL of the Excel / CSV file and the data is retrieved same as above method.
I believed the problem occurs during the credentials validation process rather than the getting data process for the report.
If you can let us know whethere there are known issues for the refresh operation or credentials update operation that will be helpful as we can re-arrange our develppment plan.
Thanks,
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
8 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
6 | |
3 | |
2 | |
2 | |
2 |