Forum Discussion
Roger Roger
Apr 28, 2020Iron Contributor
Dynamic AD group
Hi Experts I am using exchange hybrid environment, all my users are created on onprem and migrated to cloud. for example i have user1 whose department number is 100, every user has department numb...
ViktorHedberg
Apr 30, 2020Copper Contributor
Roger Roger Yes, if you have a Azure AD Premium subscription you can utilize Dynamic Groups as per your requirements.
https://docs.microsoft.com/en-us/azure/active-directory/users-groups-roles/groups-dynamic-membership
In your case the syntax would be "(user.accountEnabled -eq true) and (user.department -eq "100") or (user.department -eq "101")". This would allow all enabled users with these values in the Department Attribute to be added dynamically to this group. Provided that their account gets disabled when their employment ends, they lose membership to this group.
Regards,
Viktor