Forum Discussion
ursami08
Oct 22, 2020Copper Contributor
Non-dyanamic groups.
Can we remove users from all the Non-dynamic groups once his account is disabled in AAD?
- Thijs LecomteBronze ContributorNo by default. But you could write a script that uses Powershell or the Graph API. this command should help you => https://docs.microsoft.com/en-us/powershell/module/azuread/get-azureadusermembership?view=azureadps-2.0
Here's a script I wrote a while back for this scenario: https://github.com/michevnew/PowerShell/blob/master/Remove_User_All_Groups.ps1
And the help file: https://github.com/michevnew/PowerShell/blob/master/Remove_User_All_Groups.md