Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I want to use Get-PowerBIWorkspace to iterate through the users in my workspaces.
When I try to use the command, including specifying one of the workspaces I am workspace admin in, I still get an unuthorized error message.
Get-PowerBIWorkspace : Operation returned an invalid status code 'Unauthorized'
At line:1 char:1
+ Get-PowerBIWorkspace -Id 8b416040-0dc6-46c4-b784-6e45ba0a239e
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...owerBIWorkspace:GetPowerBIWorkspace) [Get-PowerBIWorkspace], HttpOperationException
+ FullyQualifiedErrorId : Operation returned an invalid status code 'Unauthorized',Microsoft.PowerBI.Commands.Workspaces.GetPowerBIWorkspace
I an NOT global Power BI admin, our organization is too large for that. We simply create workspaces and grant people admin rights to them as needed.
Is there anyway to use the Power BI PowerShell modules without being a global PBI Admin?
Solved! Go to Solution.
Hi @sasdfasdfsad ,
Unfortunately not, there's only 2 scope Individual and Organizational. Individual scope gives access to entities that current user has. For organizational scope, it has to be admin account to check entities across organization.
https://github.com/microsoft/powerbi-powershell
If this post helps, please accept this as a solution. Appreciate your kudos.
Thanks,
Pallavi
Thanks,
Pallavi
Hi @sasdfasdfsad ,
Unfortunately not, there's only 2 scope Individual and Organizational. Individual scope gives access to entities that current user has. For organizational scope, it has to be admin account to check entities across organization.
https://github.com/microsoft/powerbi-powershell
If this post helps, please accept this as a solution. Appreciate your kudos.
Thanks,
Pallavi
Thanks,
Pallavi
how did you authenticate? Via Login-PoweBI ?
Very good question, I should have included that
Login-PowerBIServiceAccount
then when that came back successfully
Get-PowerBIWorkspace
which returned the error message
However,
I just tried
Login-PowerBI
and while it authenticates fine, I still get the same error when I issue the
Get-PowerBIWorkspace
command.
PS C:\Users\OITCOFloryJ> Get-PowerBIWorkspace
Get-PowerBIWorkspace : Operation returned an invalid status code 'Unauthorized'
At line:1 char:1
+ Get-PowerBIWorkspace
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...owerBIWorkspace:GetPowerBIWorkspace) [Get-PowerBIWorkspace], HttpOperationException
+ FullyQualifiedErrorId : Operation returned an invalid status code 'Unauthorized',Microsoft.PowerBI.Commands.Workspaces.GetPowerBIWorkspace