New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export-PowerBIReport returns Unauthorized #88

aabundez opened this Issue Oct 31, 2018 · 3 comments


None yet
3 participants
Copy link

aabundez commented Oct 31, 2018

I am the admin for a Workspace (original workspace paradigm, not new one) and I cannot run the Export-PowerBIReport cmdlet. It keeps returning Unauthorized. I also have the Power BI Administrator role and am the owner of this particular O365 group. I am also a Global Administrator in O365.

I can run all the other Get cmdlets for the entire Organization. It's just Export-PowerBIReport which is giving me problems. I've assigned all the rights I know about. Let me know if there's anything else I can do to troubleshoot the issue.



This comment has been minimized.

Copy link

aabundez commented Oct 31, 2018

Quick update. I was able to use Invoke-PowerBIRestMethod and the Export Reports In Groups endpoint just fine. So it's not a permissions issue.

Invoke-PowerBIRestMethod -Url 'groups/{groupId}/reports/{reportKey}/export' -Method Get -OutFile "C:/filename.pbix"


This comment has been minimized.

Copy link

CodeCyclone commented Nov 26, 2018

Can you add the -Verbose flag to Export-PowerBIReport and execute Resolve-PowerBIError -Last and paste the result here?
The code is invoking the Power BI SDK, there might be a bug there.

@CodeCyclone CodeCyclone self-assigned this Nov 26, 2018

@CodeCyclone CodeCyclone added the bug label Nov 26, 2018


This comment has been minimized.

Copy link

sqlchick commented Nov 27, 2018

I can add that I'm seeing this as well -- but only with a V1 workspace. Each of my V2 workspaces behave as expected. When executing Export-PowerBIReport on a V1 workspace, it returns unauthorized even though I'm an admin on the workspace itself & can export the PBIX from the portal without any issues. So I agree this seems like a bug. I get the same result using a client tool (like PowerShell ISE or VSCode) & the same using Cloud Shell in the Azure portal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment