Forum Discussion
removing the bulk groups from bulk power bi workspaces
How to remove bulk groups from bulk workspaces using power bi rest api in postman.
4 Replies
- lbendlin
Super User
groups and workspaces are the same thing. Please provide a more detailed explanation of what you are aiming to achieve. What have you tried and where are you stuck?
- SravaniReddy22New Member
Yes, here Group is nothing but workspace. But in my senario. I have to remove the user groups( not worspaces) from workspace. like group means PBI_DEVELOPER and PBI_VIEWER groups.
- lbendlin
Super User
You cannot remove in bulk. Needs to be done with individual calls.
Groups - Delete User In Group - REST API (Power BI Power BI REST APIs) | Microsoft Learn
- AnonymousNot applicable
Hi SravaniReddy22 ,
You can try using powershell for this.
These cmdlets are provided in the PowerShell library and can be installed in an elevated PowerShell session:Install-Module -Name MicrosoftPowerBIMgmt
Alternatively, you can install individual modules (depending on your needs) instead of rollup modules, e.g. if you only need the Workspaces module:Install-Module -Name MicrosoftPowerBIMgmt.WorkspacesYou can use the following syntax to remove a specified user's permissions to a Power BI workspace.
Remove-PowerBIWorkspaceUser [-Scope <PowerBIUserScope>] -Id <Guid> -UserPrincipalName <String> [<CommonParameters>]Remove-PowerBIWorkspaceUser [-Scope <PowerBIUserScope>] -UserPrincipalName <String> -Workspace <Workspace> [<CommonParameters>]Removes the specified user's permissions to the Power BI workspace using the supplied inputs and the specified scope. Make sure you are logged in with Connect-PowerBIServiceAccount before running this command.
Download link: GitHub - microsoft/powerbi-powershell: PowerShell community for Microsoft PowerBI. Here you will find resources and source for PowerShell modules targeting PowerBI.
Reference: Remove-PowerBIWorkspaceUser (MicrosoftPowerBIMgmt.Workspaces) | Microsoft LearnBest Regards,
Clara Gong
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.