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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Don-Bot
Helper V
Helper V

Export Embedded Report to API that will export the binary stream

We would like to setup an email export of power bi embedded but use your application to do it.  Can someone tell me if we can use these api's to export the binary stream of the report?

Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn

1 ACCEPTED SOLUTION
v-veshwara-msft
Community Support
Community Support

Hi @Don-Bot ,
Thanks for asking the question in Microsoft Fabric Community,

Yes, you can use the Power BI REST API, specifically the Export To File endpoint to export an embedded report as a binary stream (such as PDF, PPTX, or PNG). This allows your application to generate the report file programmatically and then use that file stream for purposes like sending via email.

 

To achieve this, you can follow these steps:

1. Call the Export To File API with the report ID and desired export format.

2. Use the Get Export To File Status API to poll until the export job completes.

3. Once completed, the API provides a download URL where you can fetch the file (binary stream).

 

Requirements:

  • The workspace must be hosted in a Premium (P), Embedded (A SKU), or Fabric capacity.
  • API authentication must be done using a service principal or master user with access to the report.
  • The download URL returned by the API is valid for 24 hours.
  • Exporting to PNG will return a ZIP file containing one image per page.

Here’s the official documentation for reference:
Export Power BI embedded analytics reports API - Power BI | Microsoft Learn
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.

Thank you.

View solution in original post

1 REPLY 1
v-veshwara-msft
Community Support
Community Support

Hi @Don-Bot ,
Thanks for asking the question in Microsoft Fabric Community,

Yes, you can use the Power BI REST API, specifically the Export To File endpoint to export an embedded report as a binary stream (such as PDF, PPTX, or PNG). This allows your application to generate the report file programmatically and then use that file stream for purposes like sending via email.

 

To achieve this, you can follow these steps:

1. Call the Export To File API with the report ID and desired export format.

2. Use the Get Export To File Status API to poll until the export job completes.

3. Once completed, the API provides a download URL where you can fetch the file (binary stream).

 

Requirements:

  • The workspace must be hosted in a Premium (P), Embedded (A SKU), or Fabric capacity.
  • API authentication must be done using a service principal or master user with access to the report.
  • The download URL returned by the API is valid for 24 hours.
  • Exporting to PNG will return a ZIP file containing one image per page.

Here’s the official documentation for reference:
Export Power BI embedded analytics reports API - Power BI | Microsoft Learn
Reports - Export To File - REST API (Power BI Power BI REST APIs) | Microsoft Learn

 

Hope this helps. Please reach out for further assistance.
If this post helps, then please consider to Accept as the solution to help the other members find it more quickly and a kudos would be appreciated.

Thank you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.