Forum Discussion
Update Parameters in Group with Power Automate using Power BI REST API
Hi All,
I want to use Power Automate and the Power BI REST API to update a dataset parameter in a workspace, as there is not an easy way to manually update the parameter in the UI. The flow is not so complex, see picture below:
Up until now I have managed to have this flow working but only if I sent my own username and password hardcoded in the HTTP request, but this is not desired.
I've registered an app in Azure ADD to avoid using my credentials. I do get an access token but then the update part doesn't work, no matter what I try.
I get the following errors:
1 - "NotFound. ItemNotFound. Dataset XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX is not found". I get this error if the security group is not a member of the dataset.
Or
2- "Forbidden. InvalidRequest. This operation is only supported for the dataset owner". I get this error regardthles of the security group being the owner or not
3 Replies
- IceyCommunity Support
Hi jjrscorpio ,
Here is a post about Microsoft Flow Automation using Power BI API to refresh datasets in Power BI Workspaces:
https://www.idabergumdata.com/post/microsoft-flow-automation-using-power-bi-api.
I think the content of this blog is very similar to your operations. Hope it could help you.
Alternatively, you can post your issue on Microsoft Power Automate Community. When it comes to Microsoft Flow, this is a great place to solve problems.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jjrscorpioFrequent Visitor
Hi Icey,
I've read that post few days ago but creating the custom connector don't work also. I can't even test it while customizing it.
I found some posts yesterday suggesting that Power BI REST API runs within the user context and for this reason the grant_type should be password instead of client_credentials: https://stackoverflow.com/questions/35254559/client-credentials-dont-work-for-powerbi-rest-api and https://stackoverflow.com/questions/32341877/cant-get-client-credentials-access-token-to-authorize-power-bi?rq=1
Those blog are quite old and I haven't found any update yet, but I would be amazed as client_credentials wouldn't work, as even the official Microsoft documentation depicts the scenario using client_credentials https://docs.microsoft.com/en-us/power-bi/developer/register-app- IceyCommunity Support
Hi jjrscorpio ,
Sorry, my limited knowledge may prevent me from helping you further.
If you are a pro user, I suggest you to create a support ticket to get further help.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.