Forum Discussion
PowerBI Export RestAPI failing for 500MB file
Hi Ahmed,
Thanks a lot for your feedback and recomendations. I have the below observations after running these codes:
1. When hitting the ExportTo restAPI, power bi server returned back with a failure that PBIX is not the correct format type to download in. I checked hte documentation and it said use only PPTX, XLSX, etc and not to use PBIX
2. The second approach seems to over come the time out but it takes an anormous time to start a download and the download takes several 10s of minutes. This approach also does not seem to be stable as I hit the API URL, if I get a 307 I hit the redirect URL and if this returns a 200 or 202 in about 3-4 minutes, I start receiving the data which takes several minutes. Otherwise it fails, and I hit the initial API again and guide to the redirect url.
3. The powershell option also seems to be failing when run directly as a pwoershell script or through python. We are getting a 403 error in this process.
Any idea how we can fix this for a python script. At this point it feels we are chaising our tails because every solution results in a similar issue if not the same one.
Again thanks a ton for replying back on this question.
Hi BhumitraSharma ,
Thanks for reaching out to Microsoft Fabric Community and for sharing the detailed observations.
Based on the behaviour you described, this is consistent with how the Export Report API handles larger PBIX files. The API is synchronous, and for large files the processing time can exceed what the service allows. Microsoft’s documentation mentions that timeouts can occur during PBIX export and that preferClientRouting can help with routing issues, although it does not specify an exact timeout duration.
Reports - Export Report - REST API (Power BI Power BI REST APIs) | Microsoft Learn
The preferClientRouting redirect is expected. It only ensures the request reaches the correct cluster and does not shorten the time needed to generate the PBIX.
PowerShell and Python show similar behaviour since both rely on the same synchronous API.
If this PBIX needs to be exported reliably, reducing the file size may help by lowering the processing time. If the issue continues, collecting the request ids and timestamps from the failures and raising a support ticket would allow the engineering team to check backend logs and confirm whether the export is hitting a service limitation or something specific to the environment.
Please reach out for further assistance,
Thank you.
- v-veshwara-msft8 months agoCommunity Support
Hi BhumitraSharma ,
Just wanted to check if the response provided was helpful. If further assistance is needed, please reach out.Additionally, could you please confirm whether the issue has been addressed through the support ticket with Microsoft?
If the issue is now resolved, we’d greatly appreciate it if you could share any key insights or the resolution here for the benefit of the wider community.
Thank you.