Forum Discussion
Update Datatsource setting of PowerBi Report with API as Source through PowerBi Rest API
We have published the report to workspace using PowerBi Import Rest API. Whenever we try to referesh that report using PowerBi Refresh Dataset API(POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshes), it gives the Datasource has no credentials error.
When we update the below settings manually into workspace and trys to refresh, it gets succeeded
Do we have any Rest API to update this settings
Hi madhukardevale ,
How did you refresh the data during development? Did this work?
What happens if you sign in in the service as shown in your screenshot, is it then possible to refresh the semantic model manually in the service itself?
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
13 Replies
- tackytechtomMost Valuable Professional
Hi madhukardevale ,
How did you refresh the data during development? Did this work?
What happens if you sign in in the service as shown in your screenshot, is it then possible to refresh the semantic model manually in the service itself?
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- madhukardevaleFrequent Visitor
It updates web datasource. We can refresh the semantic model from service as well as Rest API also
- madhukardevaleFrequent Visitor
Tried below API but no luck. skipTestConnection is not present in the payload
- tackytechtomMost Valuable Professional
Ok, so it works if you update the credentials in the service and then fire the Refreshes REST API, right?
I guess updating the credentials in the service should be a one time thing and you do not need to update credentials right before every refresh.
Does this work for you?/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/- madhukardevaleFrequent Visitor
Yes it works if you update crdentials in service once but we don't want that manual intervention as our reports are published through application and we want the refresh also through application itself
- tackytechtomMost Valuable Professional
Now, I completely understand, what you are trying to do! 🙂
Have you tried setting a "skipTestConnection" or "skipConnection" flag to true? Sometimes they do exist under the hood, although the documentation does not list them.
Here an od thread:
Re: Power BI REST API Skip Test Connection - Microsoft Fabric Community
There seems to be an idea as well.
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
- ReneSchlegelResolver I
The API endpoint you are using is for the personal workspace only (see here😞
Triggers a refresh for the specified dataset from My workspace.
There is another endpoint you can use to refresh datasets in any other workspace:
POST https://api.powerbi.com/v1.0/myorg/groups/{groupId}/datasets/{datasetId}/refreshesIt's just a guess as to what's going wrong, but maybe it will help. If so, the error message is really misleading!
- madhukardevaleFrequent Visitor
I am using this API only.
- v-karpurapudCommunity Support
Hello madhukardevale
Hope you are doing well!Could you please confirm if your query have been resolved the solution provided by tackytechtom & ReneSchlegel ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.
Thank you
- madhukardevaleFrequent Visitor
This is not yet resolved
- v-karpurapudCommunity Support
Hello madhukardevale
We regret to hear that the issue with refreshing the Power BI report using the Power BI Refresh Dataset API remains unresolved. Although the report was published to the workspace via the Power BI Import REST API, the refresh attempt results in the error:"The datasource has no credentials."
However, manually updating the datasource settings in the Power BI Service allows the refresh to work successfully.
Since this issue persists when using the REST API, we recommend raising a support ticket with Microsoft for further investigation and resolution. Their support team will be able to assist you more effectively.
You can submit a ticket through the Microsoft Power BI Support Portal:
How to create a Fabric and Power BI Support ticket - Power BI | Microsoft Learn
If you find this post helpful, please mark it as an "Accept as Solution" and give a KUDOS.
Thank you!
- v-karpurapudCommunity Support
Hello madhukardevale
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.