Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
HI All,
I am trying Add Active Directory Security Group to workspace using PowerShell.
I can do it manually ( I am Global Admin on the tenant)
I can add specific user using the PowerShell cmdlet
# Authenticate to the Power BI service
Connect-PowerBIServiceAccount
"ADD-PowerBIWorkspaceUser -id <workspaceId> -UserEmailAddress - <UserPrincipalName> - AccessRight <AccessRight>"
The issue is when I try using th same command to Add AD Security Group (Email enabled) I get an error saying
Here is the cmdlet.
# Authenticate to the Power BI service
Connect-PowerBIServiceAccount
Add-PowerBIWorkspaceUser -Scope Organization -Id <WorkspaceId> -Identifier <AD Group GUI> -AccessRight Viewer -PrincipalType Group
And Here is the error I am getting
Add-PowerBIWorkspaceUser: Operation returned an invalid status code 'BadRequest'
and using the Resolve-PowerBIError cmdlet
I get "InvalidRequest","message":"Parameter PrincipalType or Identifier is missing or invalid"
I am wondering if there is something I am missing.
P.S. On V2 workspace. Using connect-PowerBIServiceAccount to connect to the powerbi.com.
Thanks in advance.
Solved! Go to Solution.
Hi , @mr_method
I use your cmdlet in PowerShell and return the same error:
The warning message "Only preview workspaces are supported when -Scope Organization is specified" indicates that the workspace you are trying to add the user to is not a preview workspace.
The -Scope Organization
parameter is used to specify that the workspace is an organizational workspace, which is a new type of workspace that is currently in preview. Preview workspaces are not yet generally available and are subject to change.
For now , you can just omit the -Scope Organization parameter to test :
Add-PowerBIWorkspaceUser -Id "workspace ID" -Identifier "Group Object ID" -AccessRight Viewer -PrincipalType Group
And the Group Object ID you can get in Azure Portal:
And then you can add it in workspace successfully:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @mr_method
I use your cmdlet in PowerShell and return the same error:
The warning message "Only preview workspaces are supported when -Scope Organization is specified" indicates that the workspace you are trying to add the user to is not a preview workspace.
The -Scope Organization
parameter is used to specify that the workspace is an organizational workspace, which is a new type of workspace that is currently in preview. Preview workspaces are not yet generally available and are subject to change.
For now , you can just omit the -Scope Organization parameter to test :
Add-PowerBIWorkspaceUser -Id "workspace ID" -Identifier "Group Object ID" -AccessRight Viewer -PrincipalType Group
And the Group Object ID you can get in Azure Portal:
And then you can add it in workspace successfully:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.