- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Getting forbidden error when trying to export report to PDF
I'm trying to use the API to export a report that's being embedded into one of our applications, however I keep getting a Forbidden error, however I know my authenticaion mechanism is fine as I can do other stuff via the API like refreshing reports, generating embeed tokens etc.
I read somewhere that it might be due to my user accounts subscription tier (Pro). Can anyone here confirm if I need to go Premium to access this functionality?
Here is the code in case you're wondering what I'm doing
public async Task<string> ExportReport(Guid groupId, Guid reportId, FileFormat format)
{
var authenticationResult = await _authContext.AcquireTokenAsync(_resourceUrl, _credential);
var tokenCredentials = new TokenCredentials(authenticationResult.AccessToken, "Bearer");
using (var client = new PowerBIClient(new Uri(_apiUrl), tokenCredentials))
{
var request = new ExportReportRequest(format);
// this line below is where I get the forbidden
var export = await client.Reports.ExportToFileAsync(groupId, reportId, request);
var result = await PollExportRequest(client, reportId, groupId, export.Id, 5);
// rest of the code ommited for brevity
}
}
any help would be greatly appreciated.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @dresp
For reference: Limitations of Export Power BI report to file (preview)
- The report you're exporting must reside on a Premium or Embedded capacity.
- The dataset of the report you're exporting must reside on a Premium or Embedded capacity.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @dresp
For reference: Limitations of Export Power BI report to file (preview)
- The report you're exporting must reside on a Premium or Embedded capacity.
- The dataset of the report you're exporting must reside on a Premium or Embedded capacity.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@dresp Maybe check the Tenant settings for Export and sharing settings in the Admin portal?
Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!: Power BI Cookbook Third Edition (Color)
DAX is easy, CALCULATE makes DAX hard...

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
06-24-2024 05:00 AM | |||
09-20-2024 05:11 AM | |||
09-20-2024 06:38 AM | |||
05-08-2024 10:40 PM | |||
10-24-2023 02:02 AM |
User | Count |
---|---|
11 | |
3 | |
3 | |
2 | |
2 |
User | Count |
---|---|
13 | |
6 | |
5 | |
3 | |
2 |