<?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 shared report to file using REST API - 401: GroupNotAccessible in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Export-shared-report-to-file-using-REST-API-401/m-p/3924284#M52544</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/574777"&gt;@plugin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The behavior you are experiencing is due to the permission model in Power BI. In Power BI, access to reports is controlled by workspace-level permissions. If users can only access shared reports and not the entire workspace, they will not be able to perform certain actions, such as exporting a report to a file using the REST API. This limitation is due to the fact that the API call to export a report relies on access to the workspace containing the report.&lt;/P&gt;&lt;P&gt;To use the export-to-file-in-group API, the user needs access to the workspace where the report is located. This is because the API operates at the workspace level (called "group" in the API endpoint), which you can refer to the official documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-new-workspaces" target="_blank"&gt;https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-new-workspaces&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Power BI REST API documentation outlines that certain operations require specific permissions. Exporting a report to a file requires that the user has the right to read the report and access the workspace it contains.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group" target="_blank"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hackcrr_0-1715865461609.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1099644iB01F222B3E1EDBC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hackcrr_0-1715865461609.png" alt="hackcrr_0-1715865461609.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This 401 Error: GroupNotAccessible error indicates that the user is not authorized to access the workspace (group) in which the report resides. This error indicates that there is a permissions issue where the API does not have access to the workspace context required to perform the export operation.&lt;/P&gt;&lt;P&gt;To resolve this issue, the user needs to be granted at least Viewer access to the workspace containing the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;hackcrr&lt;/P&gt;&lt;P&gt;If this post helps, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 May 2024 13:19:26 GMT</pubDate>
    <dc:creator>hackcrr</dc:creator>
    <dc:date>2024-05-16T13:19:26Z</dc:date>
    <item>
      <title>Export shared report to file using REST API - 401: GroupNotAccessible</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Export-shared-report-to-file-using-REST-API-401/m-p/3924069#M52543</link>
      <description>&lt;P&gt;&lt;STRONG&gt;The situation:&amp;nbsp;&lt;/STRONG&gt;&lt;BR /&gt;The report is shared with the user. Workspace is not shared.&lt;BR /&gt;So, the user &lt;STRONG&gt;has access to the report&lt;/STRONG&gt; on Power Bi Coud.&lt;BR /&gt;&lt;BR /&gt;At the same time, the user &lt;STRONG&gt;can't export the report to a file&lt;/STRONG&gt; using the API call&amp;nbsp;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group" target="_blank" rel="noopener"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The response code is 401 and the headers are:&lt;/P&gt;&lt;DIV class=""&gt;&lt;PRE&gt;content-length: 0
requestid: 5dc35063-3e7e-45af-85d1-хххххххххх
x-powerbi-error-info: GroupNotAccessible&lt;/PRE&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The question:&lt;/STRONG&gt;&lt;BR /&gt;Does anybody can share the documentation where this limitation is described? Or is this the wrong API behavior?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 12:16:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Export-shared-report-to-file-using-REST-API-401/m-p/3924069#M52543</guid>
      <dc:creator>plugin</dc:creator>
      <dc:date>2024-05-16T12:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: Export shared report to file using REST API - 401: GroupNotAccessible</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Export-shared-report-to-file-using-REST-API-401/m-p/3924284#M52544</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/574777"&gt;@plugin&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The behavior you are experiencing is due to the permission model in Power BI. In Power BI, access to reports is controlled by workspace-level permissions. If users can only access shared reports and not the entire workspace, they will not be able to perform certain actions, such as exporting a report to a file using the REST API. This limitation is due to the fact that the API call to export a report relies on access to the workspace containing the report.&lt;/P&gt;&lt;P&gt;To use the export-to-file-in-group API, the user needs access to the workspace where the report is located. This is because the API operates at the workspace level (called "group" in the API endpoint), which you can refer to the official documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-new-workspaces" target="_blank"&gt;https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-new-workspaces&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The Power BI REST API documentation outlines that certain operations require specific permissions. Exporting a report to a file requires that the user has the right to read the report and access the workspace it contains.&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group" target="_blank"&gt;https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hackcrr_0-1715865461609.png" style="width: 400px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/1099644iB01F222B3E1EDBC9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hackcrr_0-1715865461609.png" alt="hackcrr_0-1715865461609.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This 401 Error: GroupNotAccessible error indicates that the user is not authorized to access the workspace (group) in which the report resides. This error indicates that there is a permissions issue where the API does not have access to the workspace context required to perform the export operation.&lt;/P&gt;&lt;P&gt;To resolve this issue, the user needs to be granted at least Viewer access to the workspace containing the report.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;hackcrr&lt;/P&gt;&lt;P&gt;If this post helps, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 13:19:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Export-shared-report-to-file-using-REST-API-401/m-p/3924284#M52544</guid>
      <dc:creator>hackcrr</dc:creator>
      <dc:date>2024-05-16T13:19:26Z</dc:date>
    </item>
  </channel>
</rss>

