Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
prathyoo
Advocate II
Advocate II

Automated export of PBIX and RDL files from workspaces to sharepoint

Hi,

 

We have around 120 PBIX and RDL reports distributed in around 8 workspaces. These RDL and PBIX files are handled by different DEV teams and do undergo changes and refinements over time. So, we were looking to have a weekly export of each of these files and to keep a copy in sharepoint. We were able to figure this out using Power Automate. Here is what we did -

 

The first couple of actions was to create a folder in sharepoint -

 

prathyoo_0-1639385129643.png

 

Next, we initialized an array variable with the list of workspaces that we want the rest of the flow to work with -

 

prathyoo_1-1639385460985.png

 

And for each workspace, we get the Workspace Id or the group id using the API call to https://api.powerbi.com/v1.0/myorg/groups. This is done using the action Get Web Resource (HTTP with Azure AD). This circumvents the need to have an app registration for calling api.powerbi.com.

prathyoo_2-1639385673866.png

 

prathyoo_3-1639385848047.png

 

The subsequent steps are pretty straight forward and involves creating sub folders with the name of the workspace and using the following two API calls to list the reports in the workspace to get the report id and then to export the reports -

 

prathyoo_4-1639386088860.png

 

prathyoo_5-1639386165505.png

 

The entire process of export of 120 PBIX and RDL files took approximately 13 minutes (including a 95 MB master dataset pbix file). The reportType output was used to determine the extension of the file as shown in the expression in the above action.

 

 

9 REPLIES 9
tfrank0910
Regular Visitor

@prathyoo Thank you for this, it's really helpful! I'm trying to implement but I keep getting an error saying the file is encrypted or corrupted. Any thoughts? Would you be able to share additional screenshots of your setup? I'm wondering if I'm missing a step or setting.

That is the issue with any Power BI report created directly from the Power BI service. You will notice that in the Power BI service, you cannot download those report PBIX. My solution only works for Power BI reports that were created and published using Power BI Desktop.

These were created and published through PowerBi Desktop. I've tried multiple reports and it happens with all of them. I even created a new one with a simple data set and a single table just to make sure it wasn't some sort of size limitation but that failed too.

jedwards_CSS
Advocate II
Advocate II

Has anybody done this to a local drive folder?

nabilrizvi
New Member

Hi, I am getting errors. Question: is there only one loop or three loops? Where did variable called id come from and and same with Apply_to_each_3?

Vanessa250919
Helper V
Helper V

Hey ! thanks for you post... My folder stay empty .. One idea ?

v-henryk-mstf
Community Support
Community Support

Hi @prathyoo ,

 

Thank you for sharing. For this kind of sharing, I suggest you can post to blog forum.


You can mark this original post as a standard answer to help the other members find it more quickly. Looking forward to your reply.😊


Best Regards,
Henry

 

Hi @v-henryk-mstf ,

 

Thanks. Yes, next time I will try and create a blog post. For this one I am not sure how to mark the post as a "Standard Answer". I couldn't find such an option on the page (but I might be missing some trick).

Hi @prathyoo ,


In general, you can see something like "accept as solution" in the following screenshot, click on it.

vhenrykmstf_0-1639721454719.png


Best Regards,
Henry

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors