Forum Discussion
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 [email protected] -AccessRight Admin
And getting the error :
warning: only preview workspaces are support when -scope organization is specified
What am I doing wrong?
Regards
David
- Anonymous4 years ago
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 [email protected] -AccessRight AdminPlease 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 ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1 Reply
- AnonymousNot applicable
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 [email protected] -AccessRight AdminPlease 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 ZhouIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.