The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I was trying to use Export-PowerBIReport or Invoke-PowerBIRestMethod to export a Power BI Report (~25MB in size) and I'm getting a 500 internal server error. After reviewing the API documentation (https://docs.microsoft.com/en-us/rest/api/power-bi/reports/export-report-in-group) I see this note:
"As a workaround for fixing timeout issues, you can set preferClientRouting to true.
Large files are downloaded to a temporary blob. Their URL is returned in the response and stored in the locally downloaded PBIX file."
When I add that (https://api.powerbi.com/v1.0/myorg/groups/{groupId}/reports/{reportId}/export?preferClientRouting=tr...) I get a 403 Forbidden. I'm the Power BI admin on the tenant and I'm an admin on the workspace. The workspace is also not in a large dataset format at the moment.
I've tried this on 3 different tenants, and I am only able to replicate the 403 error on Power BI instances on East 2. On East 2, the workspace can be Pro, Premium Per User, or Premium and I get the same result (403). On a sovereign tenant the export api call works without issue.
What I have discovered is the redirect URL provided by the API in the 307 response is inaccessible. However, the URL that works via the manual method is at the same host (ex. https://wabi-us-east2-b-primary-redirect.analysis.windows.net) but at a different endpoint “export/v201606/reports/{Report ID}/pbix”. This appears to be a bug on a commericial tenant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.