Azure Dynamic Groups

Copper Contributor

Hello,

 

I have a requirement to create a dynamic group to hold all licensed users listed under it, can someone please help in this matter?

 

 New-AzureADMSGroup

 

thanks,

Claude

 

 

1 Reply

What I did to add all users which are assigned AD Premium license (just an example):
Query an user Get-AzureADUser -SearchString user@inthecloud247.com | Select -ExpandProperty AssignedPlans
You get back all assigned plans. I took the servicePlanID of AADPremiumService and added that to the Advanced Rule (Query) in this form:
user.assignedPlans -any (assignedPlan.servicePlanId -eq "21b439bx-x0xx-424f-x6xx-52f954x5b111" -and assignedPlan.capabilityStatus -eq "Enabled")