Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
plugin
Regular Visitor

Export shared report to file using REST API - 401: GroupNotAccessible

The situation: 
The report is shared with the user. Workspace is not shared.
So, the user has access to the report on Power Bi Coud.

At the same time, the user can't export the report to a file using the API call https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group

The response code is 401 and the headers are:

content-length: 0
requestid: 5dc35063-3e7e-45af-85d1-хххххххххх
x-powerbi-error-info: GroupNotAccessible

 

The question:
Does anybody can share the documentation where this limitation is described? Or is this the wrong API behavior? 

1 ACCEPTED SOLUTION
hackcrr
Memorable Member
Memorable Member

Hi, @plugin 

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.

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:

https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-new-workspaces

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.

https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group

hackcrr_0-1715865461609.png

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.

To resolve this issue, the user needs to be granted at least Viewer access to the workspace containing the report.

 

Best Regards,

hackcrr

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
hackcrr
Memorable Member
Memorable Member

Hi, @plugin 

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.

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:

https://learn.microsoft.com/en-us/power-bi/collaborate-share/service-new-workspaces

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.

https://learn.microsoft.com/en-us/rest/api/power-bi/reports/export-to-file-in-group

hackcrr_0-1715865461609.png

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.

To resolve this issue, the user needs to be granted at least Viewer access to the workspace containing the report.

 

Best Regards,

hackcrr

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.