<?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: Export-PowerBIReport Forbidden with Service Principle in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2375212#M34767</link>
    <description>&lt;P&gt;I figured this out. Along with the admin portal/developer setting api permissions for service principals, they also need to be granted the permissions to download .pbix files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="powerbi_jenhen_0-1646405267724.png" style="width: 522px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/679434i1B7C40579B035716/image-dimensions/522x377?v=v2" width="522" height="377" role="button" title="powerbi_jenhen_0-1646405267724.png" alt="powerbi_jenhen_0-1646405267724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2022 14:48:44 GMT</pubDate>
    <dc:creator>powerbi_jenhen</dc:creator>
    <dc:date>2022-03-04T14:48:44Z</dc:date>
    <item>
      <title>Export-PowerBIReport Forbidden with Service Principle</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2353845#M34562</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm attempting to use "Export-PowerBIReport" with service principle authentication to export a .pbix file to a local drive. I keep receiving the "Forbidden" error. Is this not possible with a service principle? I have also attempted to run this via powershell within a devops pipeline using an on-premise agent but again the same error is received. I can run Get-PowerBIReport with no issues via the service principle and I can use a domain account with PBI and local drive permissions to export the .pbix but how can I do this with a service principle? Ultimately I want to run this within a devops pipeline for archiving automation purposes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 15:52:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2353845#M34562</guid>
      <dc:creator>powerbi_jenhen</dc:creator>
      <dc:date>2022-02-22T15:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Export-PowerBIReport Forbidden with Service Principle</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2360496#M34623</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/315791"&gt;@powerbi_jenhen&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;First, please check whether you enable the following&amp;nbsp;Power BI service admin settings in &lt;A href="https://docs.microsoft.com/en-us/power-bi/admin/service-admin-portal" target="_self"&gt;Admin portal&lt;/A&gt;:&lt;/P&gt;
&lt;P&gt;1. &lt;A href="https://docs.microsoft.com/en-us/power-bi/admin/service-admin-portal#allow-service-principals-to-use-power-bi-apis" target="_self"&gt;Allow service principals to user Power BI APIs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_0-1645771454204.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/675557i34EE83DE497D61C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_0-1645771454204.png" alt="yingyinr_0-1645771454204.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;&lt;A href="https://docs.microsoft.com/en-us/power-bi/admin/read-only-apis-service-principal-authentication" target="_self"&gt;Allow service principals to use read-only Power BI admin APIs&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_1-1645771575622.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/675559iC40256A0E923B9BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_1-1645771575622.png" alt="yingyinr_1-1645771575622.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Then make sure that grant the access to the the workspace which the report located in with &lt;STRONG&gt;memeber&lt;/STRONG&gt; or &lt;STRONG&gt;admin&lt;/STRONG&gt; role.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_2-1645771708382.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/675560i2B7DAFB780B6C1D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_2-1645771708382.png" alt="yingyinr_2-1645771708382.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And please check whether hit any following &lt;A href="https://docs.microsoft.com/en-us/power-bi/create-reports/service-export-to-pbix#limitations-downloading-a-pbix-from-a-report" target="_self"&gt;limitation&amp;nbsp;of downloading a .pbix from a report&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yingyinr_3-1645772496991.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/675567iBEE43D785A8D6D77/image-size/large?v=v2&amp;amp;px=999" role="button" title="yingyinr_3-1645772496991.png" alt="yingyinr_3-1645772496991.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In addition, the following is the threads which has the same problem with yours. Hope they can help you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/Microsoft/powerbi-powershell/issues/65" target="_self"&gt;Allow Export-PowerBIReport Is not working as admin #65&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://github.com/microsoft/powerbi-powershell/issues/51" target="_self"&gt;Permissions needed for Service Principal #51&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.powerbi.com/t5/Developer/Service-Principle-cannot-Get-PowerBIWorkspace/m-p/2315614" target="_self"&gt;&lt;SPAN&gt;Service Principle cannot Get-PowerBIWorkspace&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 07:04:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2360496#M34623</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-02-25T07:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Export-PowerBIReport Forbidden with Service Principle</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2361634#M34638</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply. I can confirm that all the above has been set. I can run all API commands except "Export-PowerBIReport" via the service principle. If I use a domain account with PBI admin access and the export location access the&amp;nbsp;"Export-PowerBIReport" command works. Can you confirm the Export command is a limitation with the service principle? Is there anyway to impersonate a domain account with service principle authentication to successfully export? I need to use service principle to avoid authentication prompts when running my Powershell tasks within DevOps pipelines.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 16:27:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2361634#M34638</guid>
      <dc:creator>powerbi_jenhen</dc:creator>
      <dc:date>2022-02-25T16:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Export-PowerBIReport Forbidden with Service Principle</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2361642#M34639</link>
      <description>&lt;P&gt;My service principle has access to all Power BI Service scopes within our AAD application also&lt;/P&gt;</description>
      <pubDate>Fri, 25 Feb 2022 16:31:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2361642#M34639</guid>
      <dc:creator>powerbi_jenhen</dc:creator>
      <dc:date>2022-02-25T16:31:49Z</dc:date>
    </item>
    <item>
      <title>Re: Export-PowerBIReport Forbidden with Service Principle</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2375212#M34767</link>
      <description>&lt;P&gt;I figured this out. Along with the admin portal/developer setting api permissions for service principals, they also need to be granted the permissions to download .pbix files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="powerbi_jenhen_0-1646405267724.png" style="width: 522px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/679434i1B7C40579B035716/image-dimensions/522x377?v=v2" width="522" height="377" role="button" title="powerbi_jenhen_0-1646405267724.png" alt="powerbi_jenhen_0-1646405267724.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 14:48:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Export-PowerBIReport-Forbidden-with-Service-Principle/m-p/2375212#M34767</guid>
      <dc:creator>powerbi_jenhen</dc:creator>
      <dc:date>2022-03-04T14:48:44Z</dc:date>
    </item>
  </channel>
</rss>

