<?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: Unauthorized error when trying to export report using Powershell command Export-PowerBIReport in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3928065#M52627</link>
    <description>&lt;P&gt;Can you please share those requirements with me. I didn't see much in the documentation. Thanks!&lt;/P&gt;</description>
    <pubDate>Fri, 17 May 2024 16:40:06 GMT</pubDate>
    <dc:creator>vijaykvs</dc:creator>
    <dc:date>2024-05-17T16:40:06Z</dc:date>
    <item>
      <title>Unauthorized error when trying to export report using Powershell command Export-PowerBIReport</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3925050#M52596</link>
      <description>&lt;P&gt;I am trying to export pbix report to my local machine. I have admin access on the workspace and am able to list the reports. However, I'm getting "unauthorized..." error while trying to export the report. Appreciate any help here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code I'm using&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Connect-PowerBIServiceAccount

Export-PowerBIReport -Id XXXXX -WorkspaceId XXXXX -OutFile .\ExportReportByPowershell.pbix -Verbose&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Error Message:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Export-PowerBIReport : Operation returned an invalid status code 'Unauthorized'&lt;BR /&gt;At line:12 char:3&lt;BR /&gt;+ Export-PowerBIReport -Id $reportId -WorkspaceId $workspace.Id -OutF ...&lt;BR /&gt;+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~&lt;BR /&gt;+ CategoryInfo : WriteError: (Microsoft.Power...rtPowerBIReport:ExportPowerBIReport) [Export-PowerBIReport], HttpOperationException&lt;BR /&gt;+ FullyQualifiedErrorId : Operation returned an invalid status code 'Unauthorized',Microsoft.PowerBI.Commands.Reports.ExportPowerBIReport&lt;BR /&gt;&lt;BR /&gt;VERBOSE: Request Uri: &lt;A href="https://api.powerbi.com/v1.0/myorg/groups/xxxxx/reports/xxxxx/Export" target="_blank"&gt;https://api.powerbi.com/v1.0/myorg/groups/xxxxx/reports/xxxxx/Export&lt;/A&gt;&lt;BR /&gt;VERBOSE: Status Code: Unauthorized (401)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 20:59:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3925050#M52596</guid>
      <dc:creator>vijaykvs</dc:creator>
      <dc:date>2024-05-16T20:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized error when trying to export report using Powershell command Export-PowerBIReport</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3925238#M52600</link>
      <description>&lt;P&gt;There's a long list of restrictions when it comes to PBIX download.&amp;nbsp; Validate that your scenario is not covered by that list.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 01:02:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3925238#M52600</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-17T01:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized error when trying to export report using Powershell command Export-PowerBIReport</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3928065#M52627</link>
      <description>&lt;P&gt;Can you please share those requirements with me. I didn't see much in the documentation. Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 16:40:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3928065#M52627</guid>
      <dc:creator>vijaykvs</dc:creator>
      <dc:date>2024-05-17T16:40:06Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized error when trying to export report using Powershell command Export-PowerBIReport</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3928236#M52636</link>
      <description>&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/service-export-to-pbix#limitations" target="_blank" rel="noopener"&gt;Download a report from the Power BI service to Power BI Desktop - Power BI | Microsoft Learn&lt;/A&gt;&lt;/P&gt;
&lt;DIV class="" data-heading-level="h3"&gt;
&lt;H3 class=""&gt;Limitations when downloading a report .pbix file&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;You can download a file while in either Reading view or&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/service-interact-with-a-report-in-editing-view" target="_blank" rel="noopener" data-linktype="relative-path"&gt;Editing view. You must be at least a Contributor to the workspace that the report is in. If the report is based on a semantic model in another workspace, you need to be at least a Contributor to that workspace as well.&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;If you create a&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/service-quick-create-report" target="_blank" rel="noopener" data-linktype="relative-path"&gt;report by using the&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;Create&lt;SPAN&gt;&amp;nbsp;button&lt;SPAN&gt;&amp;nbsp;in the Power BI service, and it's based on a semantic model in another workspace, you can't download it.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Reports created in Power BI Desktop must be&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;published&lt;SPAN&gt;&amp;nbsp;or&lt;SPAN&gt;&amp;nbsp;&lt;EM&gt;uploaded&lt;SPAN&gt;&amp;nbsp;to the Power BI service before you can download them.&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;If you create a report in the Power BI service, you have to save it before you can download it.&lt;/LI&gt;
&lt;LI&gt;You can't download reports based on semantic models that are imported from OneDrive for work or school.&lt;/LI&gt;
&lt;LI&gt;You can't download reports based on local&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/service-excel-workbook-files" target="_blank" rel="noopener" data-linktype="relative-path"&gt;Excel&lt;SPAN&gt;&amp;nbsp;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/service-comma-separated-value-files" target="_blank" rel="noopener" data-linktype="relative-path"&gt;CSV&lt;SPAN&gt;&amp;nbsp;files that were uploaded to Power BI.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;The report you're downloading must be published or updated after November 23, 2016. Reports published earlier aren't downloadable.&lt;/LI&gt;
&lt;LI&gt;You can't download the eight original built-in sample .pbix files from the Power BI service. However, you can&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/sample-datasets#download-original-sample-pbix-power-bi-files" target="_blank" rel="noopener" data-linktype="relative-path"&gt;download those same .pbix files&lt;SPAN&gt;&amp;nbsp;from the Power BI samples article.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;You can only download usage metric reports in&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/service-export-to-pbix#download-modes" target="_blank" rel="noopener" data-linktype="self-bookmark"&gt;live connected report mode.&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;You can't download a copy of a report if the copy is saved in a workspace other than where the original report is saved.&lt;/LI&gt;
&lt;LI&gt;If you download a live connection report (connected to&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-analysis-services-tabular-data" target="_blank" rel="noopener" data-linktype="relative-path"&gt;SSAS&lt;SPAN&gt;&amp;nbsp;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-connect-pbi" target="_blank" rel="noopener" data-linktype="absolute-path"&gt;AAS) after you change its data source by using REST APIs&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources" target="_blank" rel="noopener" data-linktype="absolute-path"&gt;Update Datasources&lt;SPAN&gt;&amp;nbsp;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-datasources-in-group" target="_blank" rel="noopener" data-linktype="absolute-path"&gt;Update Datasources In Group, the downloaded .pbix will still contain the old data source.&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Reports created in the Power BI service that are based on a single semantic model that's configured for&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/service-premium-large-models" target="_blank" rel="noopener" data-linktype="relative-path"&gt;large models&lt;SPAN&gt;&amp;nbsp;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-configure" target="_blank" rel="noopener" data-linktype="relative-path"&gt;incremental refresh, or that has been modified by using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/service-premium-connect-tools" target="_blank" rel="noopener" data-linktype="relative-path"&gt;XMLA endpoint&lt;SPAN&gt;&amp;nbsp;can only be downloaded in&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/service-export-to-pbix#download-modes" target="_blank" rel="noopener" data-linktype="self-bookmark"&gt;live connected report mode.&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;If you create a Power BI report based on a semantic model in one workspace and publish the report to a different workspace, you can download the report in&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/service-export-to-pbix#download-modes" target="_blank" rel="noopener" data-linktype="self-bookmark"&gt;live connected report mode&lt;SPAN&gt;&amp;nbsp;only, if the semantic model is configured for&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/service-premium-large-models" target="_blank" rel="noopener" data-linktype="relative-path"&gt;large models&lt;SPAN&gt;&amp;nbsp;or&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-configure" target="_blank" rel="noopener" data-linktype="relative-path"&gt;incremental refresh, or it has been modified by using the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/A&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/service-premium-connect-tools" target="_blank" rel="noopener" data-linktype="relative-path"&gt;XMLA endpoint.&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Downloading a .pbix file after deployment isn't supported as part of the&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/cicd/deployment-pipelines/understand-the-deployment-process#considerations-and-limitations" target="_blank" rel="noopener" data-linktype="absolute-path"&gt;deployment pipeline (ALM).&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Downloading a .pbix file that's larger than 1 GB is only supported when the .pbix is in&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/service-export-to-pbix#download-modes" target="_blank" rel="noopener" data-linktype="self-bookmark"&gt;live connected report mode.&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;You can't download reports that are created in the Power BI service and based on a semantic model in&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;My Workspace&lt;SPAN&gt;&amp;nbsp;in&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/create-reports/service-export-to-pbix#download-modes" target="_blank" rel="noopener" data-linktype="self-bookmark"&gt;live connected report mode.&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;If you disable the switch in the tenant settings described in&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/service-datasets-admin-across-workspaces" target="_blank" rel="noopener" data-linktype="relative-path"&gt;Control the use of semantic models across workspaces, your users can't download a .pbix file from copied reports or reports created from datasets in the same workspace.&lt;/A&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;DIV class="" data-heading-level="h3"&gt;
&lt;H3 class=""&gt;Limitations when downloading a semantic model .pbix file&lt;/H3&gt;
&lt;UL&gt;
&lt;LI&gt;To download the .pbix file, you must be at least a Contributor to the workspace.&lt;/LI&gt;
&lt;LI&gt;Semantic models with&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-configure" target="_blank" rel="noopener" data-linktype="relative-path"&gt;incremental refresh&lt;SPAN&gt;&amp;nbsp;can't be downloaded to a .pbix file.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Semantic models enabled for&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/service-premium-large-models" target="_blank" rel="noopener" data-linktype="relative-path"&gt;large models&lt;SPAN&gt;&amp;nbsp;can't be downloaded to a .pbix file.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Semantic models migrated from Azure Analysis Services by using the&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/aas-pbi-migration-overview" target="_blank" rel="noopener" data-linktype="relative-path"&gt;Azure Analysis Services to Power BI Premium migration feature&lt;SPAN&gt;&amp;nbsp;can't be downloaded to a .pbix file.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Downloading a .pbix file after deployment isn't supported as part of the&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/fabric/cicd/deployment-pipelines/understand-the-deployment-process#considerations-and-limitations" target="_blank" rel="noopener" data-linktype="absolute-path"&gt;deployment pipeline (ALM).&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;Semantic models modified by using the&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/service-premium-connect-tools" target="_blank" rel="noopener" data-linktype="relative-path"&gt;XMLA endpoint&lt;SPAN&gt;&amp;nbsp;can't be downloaded to a .pbix file.&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;You can't download semantic models based on data imported from OneDrive for work or school.&lt;/LI&gt;
&lt;LI&gt;Downloading a .pbix file that's larger than 1 GB isn't supported.&lt;/LI&gt;
&lt;LI&gt;Semantic models with&lt;SPAN&gt;&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/power-bi/enterprise/aggregations-auto#considerations-and-limitations" target="_blank" rel="noopener" data-linktype="relative-path"&gt;automatic aggregations&lt;SPAN&gt;&amp;nbsp;enabled can't be downloaded to a .pbix file. You must disable automatic aggregations training in the semantic model settings and delete the aggregations tables by selecting the checkbox&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;Delete automatic aggregations tables.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 17 May 2024 18:25:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3928236#M52636</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-05-17T18:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: Unauthorized error when trying to export report using Powershell command Export-PowerBIReport</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3928397#M52640</link>
      <description>&lt;P&gt;That worked, thank you. Going by the error, I was wondering if there was a limitation with accessing the report. I see that the Large Semantic Model was set on the report. I am able to export after turning that off.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 20:32:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Unauthorized-error-when-trying-to-export-report-using-Powershell/m-p/3928397#M52640</guid>
      <dc:creator>vijaykvs</dc:creator>
      <dc:date>2024-05-17T20:32:27Z</dc:date>
    </item>
  </channel>
</rss>

