Showing results for 
Search instead for 
Did you mean: 

Unable to refresh dataflows via Microsoft Flow

Hello everybody,


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:

Operation failed (401), see response below
Unauthorized (401)
"strict-transport-security": "max-age=31536000; includeSubDomains",
"x-content-type-options": "nosniff",
"date": "Fri, 11 Jan 2019 09:50:16 GMT",
"requestid": "bf0f1148-7e1c-482a-8657-f0a630c3ebb9",
"x-frame-options": "deny",
"content-type": "application/octet-stream",
"cache-control": "no-store, must-revalidate, no-cache",
"transfer-encoding": "chunked"
The same procedure works great for refreshing datasets and it is the one shown in this guide (in a few words: registration of the app via the App registration tool, creation of the custom connector on Flow, replication of the URL on Azure and then testing with the "POST" method on the custom connector as shown on the official documentation Power BI REST dataflow reference).
In the dataflow case, I've only changed the URL from{DatasetID}/refreshes to{groupId}/dataflows/{dataflowId}/refreshes.
Is there a solution for this issue? And, in case, how can I fix it?

Thank you,
Status: Delivered

Hi @fdurante,


I tested follow the article: 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 

Frequent Visitor

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)?

Frequent Visitor

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


"error": {
"code": "BadRequest",
"message": "Bad Request",
"details": [
"message": "'refreshRequest' is a required parameter",
"target": "refreshRequest"

Hi @fdurante,


For your issue, I would suggest you create a support ticket to get dedicated support. 


Support Ticket.gif


Best Regards,
Qiuyun Yu 

Status changed to: Delivered
Frequent Visitor

The solution happens to be here, so the issue is now resolved.

Thank you very much anyways @v-qiuyu-msft!