<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Getting forbidden error when trying to export report to PDF in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-export-report-to-PDF/m-p/2023205#M31199</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/319926"&gt;@dresp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/export-to#limitations" target="_self"&gt;Limitations of Export Power BI report to file (preview)&lt;/A&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The report you're exporting must reside on a Premium or Embedded capacity.&lt;/LI&gt;
&lt;LI&gt;The dataset of the report you're exporting must reside on a Premium or Embedded capacity.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
    <pubDate>Wed, 18 Aug 2021 09:51:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-08-18T09:51:08Z</dc:date>
    <item>
      <title>Getting forbidden error when trying to export report to PDF</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-export-report-to-PDF/m-p/2016645#M31125</link>
      <description>&lt;P&gt;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.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;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?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Here is the code in case you're wondering what I'm doing&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;public async Task&amp;lt;string&amp;gt; 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 
      }
    }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;any help would be greatly appreciated.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 05:52:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-export-report-to-PDF/m-p/2016645#M31125</guid>
      <dc:creator>dresp</dc:creator>
      <dc:date>2021-08-15T05:52:46Z</dc:date>
    </item>
    <item>
      <title>Re: Getting forbidden error when trying to export report to PDF</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-export-report-to-PDF/m-p/2016727#M31126</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/319926"&gt;@dresp&lt;/a&gt;&amp;nbsp;Maybe check the Tenant settings for Export and sharing settings in the Admin portal?&lt;/P&gt;</description>
      <pubDate>Sun, 15 Aug 2021 09:53:45 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-export-report-to-PDF/m-p/2016727#M31126</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2021-08-15T09:53:45Z</dc:date>
    </item>
    <item>
      <title>Re: Getting forbidden error when trying to export report to PDF</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-export-report-to-PDF/m-p/2023205#M31199</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/319926"&gt;@dresp&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For reference:&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/developer/embedded/export-to#limitations" target="_self"&gt;Limitations of Export Power BI report to file (preview)&lt;/A&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;The report you're exporting must reside on a Premium or Embedded capacity.&lt;/LI&gt;
&lt;LI&gt;The dataset of the report you're exporting must reside on a Premium or Embedded capacity.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Aug 2021 09:51:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Getting-forbidden-error-when-trying-to-export-report-to-PDF/m-p/2023205#M31199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-08-18T09:51:08Z</dc:date>
    </item>
  </channel>
</rss>

