Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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.