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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Charline_74
Resolver I
Resolver I

Set-PowerBIWorkspace error

Hello, 

I am trying to change the name of a workspace without success:

Here is my code:

 

Set-PowerBIWorkspace -Scope Organization -Id "1fe0391c-cc6f-495a-bd48-b397c1ea2481" -Name "Test DS WS" -Description "Test WS for PS Added some description"

 

Here is the error:

 

Set-PowerBIWorkspace : Operation returned an invalid status code 'Unauthorized'
Au caractère Ligne:1 : 1
+ Set-PowerBIWorkspace -Scope Organization -Id "1fe0391c-cc6f-495a-bd48 ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.Power...owerBIWorkspace:SetPowerBIWorkspace) [Set-PowerBIWorkspace], HttpOperationException
    + FullyQualifiedErrorId : Operation returned an invalid status code 'Unauthorized',Microsoft.PowerBI.Commands.Workspaces.SetPowerBIWorkspace

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Charline_74 ,

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

Renaming an existing workspace

Best Regards

View solution in original post

2 REPLIES 2
ManuelW
Helper I
Helper I

 Dear @Anonymous, I get the point that the API User (Service Principal) need the administrator rights. But how can I add these (Office 365 Global Administrator or Power BI Service Administrator) to the Service Principal? 

 

I get a quite similar error measseage when I want to change or add a workspace description to a workspace which was created by the service princial.

 

Best

Manuel

Anonymous
Not applicable

Hi @Charline_74 ,

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

Renaming an existing workspace

Best Regards

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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