I've been trying to refresh a dataflow via a Microsoft Flow custom connector, but although I gave all the authorizations needed for APIs to read and write inside all my workspaces/reports/dashboards/etc. I get an error saying:
I tested follow the article: https://docs.microsoft.com/en-us/power-bi/service-dataflows-developer-resources. The refresh dataflow API works fine:
In your scenario, the issue could be that the access token is expired. Please renew the access token then test it again.
Best Regards,Qiuyun Yu
Thank you very much for your reply @v-qiuyu-msft.
Going deeper, I think the issue resides in the absence of the "Dataflow.ReadWrite.All" required scope, which I cannot find either in Azure or the App Registration tool. Is there a way to add it (maybe through code if not available in other ways)?
A quick update:
Now that I found the scope permission (it was Datapool.ReadWrite.All so there might be a mistake in the PBI API REST reference...) the connector works well and when I test it the dataflow is correctly refreshed.
The issue now is that when I put it in a flow (the trigger is "a file is modified or created in a SharePoint folder" and it works fine) my connector won't work and it says:
Status code: 400
For your issue, I would suggest you create a support ticket to get dedicated support.
The solution happens to be here, so the issue is now resolved.
Thank you very much anyways @v-qiuyu-msft!