Azure Active Directory
An Azure enterprise identity service that provides single sign-on and multi-factor authentication.
13,547 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I’m having trouble pulling a list of empty Azure Active Directory groups, as there are over 500 groups I need a quicker way to pull a list.
thank you in advance
Using PowerShell or? Try something like this:
Get-MsolGroup -GroupType Security | ? {(Get-MsolGroupMember -GroupObjectId $_.ObjectId).count -eq 0 }
A more "modern" approach using the Graph SDK for PowerShell:
Get-MgGroup | ? {!(Get-MgGroupMember -GroupId $_.Id)}