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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
svenaik
Regular Visitor

PowerBI embedded - download .pbix file programatically

I am developing a client side webpart using PowerBI embedded feature using a Power BI Free Account. PowerBi embedded feature requires PBIX file to be uploaded in Microsoft Azure workspace.
When I schedule a data refresh for my dataset, the report gets refresh but the PBIX generated of particular dataset doesn't gets updated.
In order to display the refreshed data in my client side webpart, an updated PBIX file needs to be replaced with the older version of PBIX.
I am able to manually download PBIX file from PowerBI Service (https://app.powerbi.com/) using "Download Report (download a pbix copy)" from file menu and also able to import the PBIX file to Azure workspace.

But my issue is below:
1. How to programatically download PBIX file.
2. Is there any API published by Microsoft to export file from the PowerBI desktop.

 

Once we get the PBIX file programatically, we have the PowerBI-cli apis to import the PBIX to workspace.

4 REPLIES 4
lglima
New Member

svenaik, did you get a solution? i have the same problem.

RobSegoa
Regular Visitor

There is a PowerBI-CLI =]
https://github.com/Microsoft/PowerBI-Cli 

Hugs!

Eric_Zhang
Microsoft Employee
Microsoft Employee

@svenaik

 

There's no official API to download the pbix file. You can submit your idea at Power BI Ideas and vote it up.

 

I also did some research, however I found it is a dead end. When downloading a pbix file, a GET request as below is actually called. I can re-do the GET request with the Bearer token in an API console like POSTMAN to download the pbix file, but the token would expire in one hour and a token generated from here can't access that request(401 error).

 

Capture.PNG

 

svenaik
Regular Visitor

I am developing a client side webpart using PowerBI embedded feature using a Power BI Free Account. PowerBi embedded feature requires PBIX file to be uploaded in Microsoft Azure workspace.
When I schedule a data refresh for my dataset, the report gets refresh but the PBIX generated of particular dataset doesn't gets updated.
In order to display the refreshed data in my client side webpart, an updated PBIX file needs to be replaced with the older version of PBIX.
I am able to manually download PBIX file from PowerBI Service (https://app.powerbi.com/) using "Download Report (download a pbix copy)" from file menu and also able to import the PBIX file to Azure workspace.

But my issue is below:
1. How to programatically download PBIX file.
2. Is there any API published by Microsoft to export file from the PowerBI desktop.

 

Once we get the PBIX file programatically, we have the PowerBI-cli apis to import the PBIX to workspace.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.