Forum Discussion

SravaniReddy22's avatar
SravaniReddy22
New Member
2 years ago

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

  • 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?

  • Anonymous's avatar
    Anonymous
    Not 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.Workspaces

     

    You 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 Learn

     

     

    Best 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.