Forum Discussion
Exporting Power BI Embedded Report to PDF Through Power Automate
Hi Boegebjerg ,
Please consider about using the exportToFile API.
The exportToFile API enables exporting a Power BI report by using a REST call. The following file formats are supported:
- .pptx (PowerPoint)
- .png
- When you export to a .png, a report with multiple pages is compressed into a .zip file
- Each file in the .zip represents a report page
- The page names are the same as the return values of the Get Pages or Get Pages in Group APIs
Note: This API is only available in for Gen2 capacities.
For more details, please refer to:
Export Power BI embedded analytics reports API - Power BI | Microsoft Learn
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-jianboli-msft
Thank you for your reply.
I am aware that this possibility exists through the API. I believe that the step in Power Automate called: "Export To File for Power BI Reports" does exactly this. However, the FlowVisual remains not authorized.
I am starting to suspect that the service principal, which hosts our embedded reports, does not have the right permissions. I have tried to give it API permissions in the App Registration module in Azure, but to no avail. Additionally, I can't seem to find this specific API permission in the module (the api permission to be able to export).
Based on your reply, would it be possible for me to have an API call inside the embedded report which the users can press at will? If so, then this might be a solution. Do you have any information on that?
Furthermore, I have tested the Power Automate flow in the embedded playground found here:
https://playground.powerbi.com/en-us/dev-sandbox
When I psuedo embed our report here, I can successfully export a PDF file. I am not sure what is causing the difference, maybe you can shed some light on it.
Best regards
Michael