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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
David_Evans
Frequent Visitor

Using PowerShell to add myself as an admin to an ex employees personal workspace

Hi,

In PowerShell using:

Add-PowerBIWorkspaceUser -Scope Organization -Id a12345bc-d123-1a23-a12b-ab012345cd6e -UserEmailAddress a.user@bcompany.com -AccessRight Admin

And getting the error :

warning: only preview workspaces are support when -scope organization is specified

What am I doing wrong?

Regards

David

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @David_Evans ,

 

Compare your code and the offical sample code, I think your code is correct.

 

Add-PowerBIWorkspaceUser -Scope Organization -Id 23FCBDBD-A979-45D8-B1C8-6D21E0F4BE50 -UserEmailAddress john@contoso.com -AccessRight Admin

 

Please make sure what kind of workspace are you trying to add user by Power Shell.  According to your statement, you are trying to adding yourself to other user's Personal Workspace as an admin. Power BI doesn't support us to add other users in Personal Workspace.

Your workspace needs to be an app workspace: classic workspace or new workspace.

Then you can add users in Power BI Service manually or add users by Power Shell.

Here is an offical blog about how to add user in Classic Workspace or New Workspace by Power Shell.

For reference: Add-PowerBIWorkspaceUser

 

Best Regards,
Rico Zhou

 

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

View solution in original post

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @David_Evans ,

 

Compare your code and the offical sample code, I think your code is correct.

 

Add-PowerBIWorkspaceUser -Scope Organization -Id 23FCBDBD-A979-45D8-B1C8-6D21E0F4BE50 -UserEmailAddress john@contoso.com -AccessRight Admin

 

Please make sure what kind of workspace are you trying to add user by Power Shell.  According to your statement, you are trying to adding yourself to other user's Personal Workspace as an admin. Power BI doesn't support us to add other users in Personal Workspace.

Your workspace needs to be an app workspace: classic workspace or new workspace.

Then you can add users in Power BI Service manually or add users by Power Shell.

Here is an offical blog about how to add user in Classic Workspace or New Workspace by Power Shell.

For reference: Add-PowerBIWorkspaceUser

 

Best Regards,
Rico Zhou

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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