This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
l need to use powershell to add a group to an existing workspace
Invoke-RestMethod -Method POST -Uri "https://api.powerbi.com/v1.0/myorg/groups/<groupId>/users" -Header @{Authorization = 'Bearer $token'; 'Content-type' = 'application/json'; 'User-Agent' = 'Jenkins'} -Body '{"principalType" = "Group", "groupUserAccessRight"= "Admin", "identifier"= "ID", "displayName"="MyGroupName"}'
I keep getting (400) Bad Request error. I am able to add individual users with this body:
{"groupUserAccessRight"= "Admin", "emailAddress"= "john@microsoft.com"}
What am I doing wrong to add groups?
EDIT: The problem seem to be the identifier number I am using. I am not sure how to retrieve the proper one though
Solved! Go to Solution.
Hi @Anonymous ,
With PowerShell, you can add an AD group to Power BI Workspace using the Groups – Add Group User API or Add-PowerBIWorkspaceUser Cmdlet.
What you will need:
For more details, please refer to:
ADDING AZURE AD SECURITY GROUP TO POWER BI WORKSPACE USING POWERSHELL - Ruki's Blog
Power BI Group management using Active Directory roles and PowerShell
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
With PowerShell, you can add an AD group to Power BI Workspace using the Groups – Add Group User API or Add-PowerBIWorkspaceUser Cmdlet.
What you will need:
For more details, please refer to:
ADDING AZURE AD SECURITY GROUP TO POWER BI WORKSPACE USING POWERSHELL - Ruki's Blog
Power BI Group management using Active Directory roles and PowerShell
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The groups need to be mail enabled AD groups. The ID is the AD GUID of the group.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |