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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Set-PowerBIWorkspace throwing unauthorized error

Cant assign my workspace to a specific capacity when I am using the command Set-PowerBIWorkspace -Scope Organization -Id "<workspaceid" -CapacityId "<capacityid>".

It throws the following error:

Set-PowerBIWorkspace : Operation returned an invalid status code 'Unauthorized'
At line:1 char:1
+ Set-PowerBIWorkspace -Scope Organization -Id "bcbf1a72-7b1e-4fac-b16 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...owerBIWorkspace:SetPowerBIWorkspace) [Set-PowerBIWorkspace], HttpOperationException
+ FullyQualifiedErrorId : Operation returned an invalid status code 'Unauthorized',Microsoft.PowerBI.Commands.Workspaces.SetPowerBIWorkspace

Status: Investigating

Hi @Anonymous ,

 

According to the error message, it seems that you didn't have the sufficient privileges to do it. The administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) is necessary when you call this command. And it only support the workspaces in the new workspace experiences. Please review the following official documentation for more details.

 

Set-PowerBIWorkspace

 

Best regards.
Community Support Team_ Caitlyn

Comments
v-xiaoyan-msft
Community Support
Status changed to: Investigating

Hi @Anonymous ,

 

According to the error message, it seems that you didn't have the sufficient privileges to do it. The administrator rights (such as Office 365 Global Administrator or Power BI Service Administrator) is necessary when you call this command. And it only support the workspaces in the new workspace experiences. Please review the following official documentation for more details.

 

Set-PowerBIWorkspace

 

Best regards.
Community Support Team_ Caitlyn

Dxsego
New Member

Hello Power BI Service Administrator is now Fabric Administrator

We are using a SNP to set Workspace Description as well as capacity and continue to get the same error message. 

 

We have confirmed that the SNP has the appropiate API permissions and have added the SNP to a SG that has been added to the appropriate BI Tenant Settings