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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
OneWithQuestion
Post Prodigy
Post Prodigy

PowerShell Add-PowerBIWorkspaceUser : Operation returned an invalid status code 'Unauthorized'

I am using the PowerShell PBI admin commands and I am unable to get this to work, has anyone else had any luck with this?

Add-PowerBIWorkspaceUser : Operation returned an invalid status code 'Unauthorized'

I use the command and include 
Add-PowerBIWorkspaceUser -Id xxxxxxx -UserPrincipalName 'myuser@fakeaddress.com' -AccessRight Admin

When I run resolve error this is what I get back that seems pertinent
Response : Unauthorized (401):
PowerBIErrorInfo : GroupNotAccessible


3 REPLIES 3
andres777
Advocate III
Advocate III

Getting the same error, even though I'm the Admin for the company.

Contributor and Viewer, no problem.

Anonymous
Not applicable

how do you resolve the problem, thanks

v-lionel-msft
Community Support
Community Support

Hi @OneWithQuestion ,

 

Are you the admin of this workspace?

 

Best regards,
Lionel Chen

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.