Search code examples
azureazure-active-directory

Remove user from a group in Intra admin centre


I'm unable to remove a user from a group in Intra admin center manually and using the PowerShell command. Error message "Insufficient privileges to remove the selected memberships". The group membership type is Dynamic.

The dynamic membership rule syntax: (user.accountEnabled -eq true)

Do share your suggestions/resolution, thanks!


Solution

  • Remove the user from a group in the Intra admin centre

    I tried in my environment and got the below results:

    Initially, I created a group with the name group326 with a dynamic membership type.

    enter image description here

    Since I also faced this same issue in the portal. I can't able to remove the user.

    enter image description here

    To remove a user from the dynamic membership

    Portal -> Groups -> < your-group-name > -> Dynamic membership rules

    In dynamic membership rule syntax add the below syntax:

    (user.accountEnabled -eq true) -and (user.userPrincipalName -ne "[[email protected]]").
    

    Portal:

    For example, I added my user principle name in the syntax.

    enter image description here

    Once you add your syntax and save the syntax it will automatically remove the user from the group.