Forum Discussion
Automate Dataflow export to .json through Power Automate or Azure Logic Apps
- 2 years ago
You need to replace in the URL https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}
{groupId}: This is the workspaceId where you have the dataflow
{dataflowId} This is the dataflowId
If you open the dataflow in PowerBI Service the URL reads something like this:
https://app.powerbi.com/groups/xx9xx9x9-x9x9-x9x9-x9x9-xx9xx9x9x9x9/dataflows/xx9xx9x9-x9x9-x9x9-x9x9-xx9xx9x9x9x9?experience=power-bi
GroupId in the Basic URL is the ID between groups/ and /dataflows/
DataflowId in the Basic URL is the ID between /dataflows/ and ?experience
You will need to authenticate using your user/pasword (same credentials as you use to log in to Power BI).
The only other thing to check that I can think of is that you have the Tenant Setting to run REST API calls enabled which I believe is in Integration Settings (but not 100% sure) Integration admin settings - Microsoft Fabric | Microsoft Learn
Hope this helps.
MarDen94 , I'm also looking into automate this export and currently working on the idea of making a REST API call from Power Automate to download the dataflow in .json using GET https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}
Details on how to use the API are available in Dataflows - Get Dataflow - REST API (Power BI Power BI REST APIs) | Microsoft Learn and Chris Webb has a series of blogs where he explains how to make the REST API call from Power Automate here Chris Webb's BI Blog: Calling The Power BI Enhanced Refresh API From Power Automate, Part 1: Creating A Basic Custom Connector (crossjoin.co.uk)
Unfortunately I cannot test all of this due to security restrictions in my organisation but thought it was worth sharing in case you find this option working (please let me know if you manage to get this working).
- JWolmanSymplr2 years agoResolver I
I quickly tried this in PostMan and could not get the basic URL to work, https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}. Not sure if I need to change myorg to something related to my actual organization or if the is some authentication I need to do, but I keep getting a 403 Forbidden response when I try to call that url with a valid GroupId and DataflowId.
- toribiolmSXP2 years agoFrequent Visitor
You need to replace in the URL https://api.powerbi.com/v1.0/myorg/groups/{groupId}/dataflows/{dataflowId}
{groupId}: This is the workspaceId where you have the dataflow
{dataflowId} This is the dataflowId
If you open the dataflow in PowerBI Service the URL reads something like this:
https://app.powerbi.com/groups/xx9xx9x9-x9x9-x9x9-x9x9-xx9xx9x9x9x9/dataflows/xx9xx9x9-x9x9-x9x9-x9x9-xx9xx9x9x9x9?experience=power-bi
GroupId in the Basic URL is the ID between groups/ and /dataflows/
DataflowId in the Basic URL is the ID between /dataflows/ and ?experience
You will need to authenticate using your user/pasword (same credentials as you use to log in to Power BI).
The only other thing to check that I can think of is that you have the Tenant Setting to run REST API calls enabled which I believe is in Integration Settings (but not 100% sure) Integration admin settings - Microsoft Fabric | Microsoft Learn
Hope this helps.
- JWolmanSymplr2 years agoResolver I
Correct I know to exchange the GroupID and the DataflowID. I tried with and without the "myorg" in the URL request and neither of those worked. Was not sure if I had to change "myorg" to something specific to my organization or not.
I tried using Basic Auth for the Authorization in Postman and I still get 403 Forbidden.
I will have to check with an admin about the Tenant Setting