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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
sasdfasdfsad
Advocate II
Advocate II

PowerShell Requires PBI Admin to work? Get-PowerBIWorkspace

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?

1 ACCEPTED SOLUTION
pallavi_r
Super User
Super User

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

View solution in original post

3 REPLIES 3
pallavi_r
Super User
Super User

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

lbendlin
Super User
Super User

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

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors