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
erossini
Frequent Visitor

Export PowerBI embedded report Forbidden

I have my ASP.NET Core project with an embedded PowerBI report. The report is always shown correct. In the Microsoft documentation, I read that now it is possible to export the report in different format. So, using the example, I put together the application. You have the code in GitHub.

 

The problem I'm facing is when I call

 

// The 'Client' object is an instance of the Power BI .NET SDK
var export = await Client.Reports.ExportToFileInGroupAsync(
                          groupId, reportId, exportRequest);

 

This call raises an Operation returned an invalid status code 'Forbidden'.

 

r4Tx9.png

 

In the Active Directory I have all the required permissions and in particular

  • Report.ReadWrite.All or Report.Read.All
  • Dataset.ReadWrite.All or Dataset.Read.All

Also, I tried to use "Try it" in the documentation. In this case, I have another kind of error

 

{
  "error": {
    "code": "InvalidRequest",
    "message": "Report requested for export is not on dedicated capacity"
  }
}

 

0gLMF.png

 

How can I fix this issue?

 

 

 

 

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @erossini,

Perhaps you can take a look at the following link about this similar issue if those suggestions suitable for your scenario:

Solved: REST API for Power BI, Reports - Export To File gi... - Microsoft Power BI Community

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.