<?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: Power BI Embedded API ExportToFile returns &amp;quot;Forbidden&amp;quot; error in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-API-ExportToFile-returns-quot-Forbidden-quot/m-p/1369931#M25703</link>
    <description>&lt;P&gt;Nope, no RLS on the report.&amp;nbsp; To clarify, displaying the report is working fine.&amp;nbsp; It's a subsequent call to ExportToFile that is generating the error.&lt;/P&gt;</description>
    <pubDate>Mon, 14 Sep 2020 18:25:04 GMT</pubDate>
    <dc:creator>erosal84</dc:creator>
    <dc:date>2020-09-14T18:25:04Z</dc:date>
    <item>
      <title>Power BI Embedded API ExportToFile returns "Forbidden" error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-API-ExportToFile-returns-quot-Forbidden-quot/m-p/1369567#M25699</link>
      <description>&lt;P&gt;I'm trying to do an ExportToFile on a report I have displayed in my app using the Power BI Embedded API.&amp;nbsp; I am using the same code to get token credentials and generate a Power BI Embedded API client object that is working when I display my report, but when I try to call Clent.Reports.ExportToFIleInGroupsAsync, it throws a "Forbidden" exception.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;var exportRequest = new ExportReportRequest&lt;BR /&gt;{&lt;BR /&gt;Format = format,&lt;BR /&gt;PowerBIReportConfiguration = powerBIReportExportConfiguration&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;// Get token credentials for user&lt;BR /&gt;var getCredentialsResult = await GetTokenCredentials();&lt;BR /&gt;if (!getCredentialsResult)&lt;BR /&gt;{&lt;BR /&gt;// The error message set in GetTokenCredentials&lt;BR /&gt;return null;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;var Client = new PowerBIClient(new Uri(ApiUrl), m_tokenCredentials);&lt;BR /&gt;var export = await Client.Reports.ExportToFileInGroupAsync(groupId, reportId, exportRequest);&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;Any thoughts on what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-- Tony&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 15:56:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-API-ExportToFile-returns-quot-Forbidden-quot/m-p/1369567#M25699</guid>
      <dc:creator>erosal84</dc:creator>
      <dc:date>2020-09-14T15:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded API ExportToFile returns "Forbidden" error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-API-ExportToFile-returns-quot-Forbidden-quot/m-p/1369595#M25701</link>
      <description>&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/247878"&gt;@erosal84&lt;/a&gt;&amp;nbsp;Any chance you are using something like RLS on that report?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 16:01:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-API-ExportToFile-returns-quot-Forbidden-quot/m-p/1369595#M25701</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-09-14T16:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Power BI Embedded API ExportToFile returns "Forbidden" error</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-API-ExportToFile-returns-quot-Forbidden-quot/m-p/1369931#M25703</link>
      <description>&lt;P&gt;Nope, no RLS on the report.&amp;nbsp; To clarify, displaying the report is working fine.&amp;nbsp; It's a subsequent call to ExportToFile that is generating the error.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2020 18:25:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-BI-Embedded-API-ExportToFile-returns-quot-Forbidden-quot/m-p/1369931#M25703</guid>
      <dc:creator>erosal84</dc:creator>
      <dc:date>2020-09-14T18:25:04Z</dc:date>
    </item>
  </channel>
</rss>

