Forum Discussion
Issue - Update Data Source Credentials through REST API failed for Web Source
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.
However the refresh result is failed and it says "The credentials provided for the SharePoint source are invalid. " It failed every time when the credentials are updated through the above REST API call.
But if we update the credentials by "Edit Credentials" at app.powerbi.com manually and login with the same account which is used to get the token, the refresh results are always good.
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.
- Anonymous4 years agoNot applicable
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
- kevinglb4 years agoFrequent Visitor
Hi Xiaoxin,
Followings are the steps that I used to get data from SharePoint:
1. Get Data -> SharePoint Folder -> enter the root URL of the site2. Click "Transform Data" -> Select the files you want to use by filtering the folder path / extension , then combine them3. 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,
- kevinglb4 years agoFrequent Visitor
Hi Xiaoxin,
Do you have any progress on this issue?
Regards,