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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Power BI Export to file Error

We are using the latest version of the API (V3)
I have copied the code examples from here - 

https://docs.microsoft.com/en-us/power-bi/developer/embedded/export-to

in my 'PostExportRequest' function I have tried the following - 

var Client = GetPowerBiClient();
var export = Client.Reports.ExportToFileAsync(reportId, exportRequest); 
export.Wait(); 
var exportResult = export.Result;


On the wait, I get a 'Forbidden' error

The user accessing this is acting as a Service Principal and is set to have full admin rights on the PowerBI settings.

 

on this -

var Client = GetPowerBiClient(); var export = Await Client.Reports.ExportToFileAsync(reportId, exportRequest);


This never completes and seems to run forever.

19 REPLIES 19

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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