Forum Discussion
fomar2130
Jul 01, 2022Copper Contributor
filter for dynamic group that is intersection of two other groups
I have a problem: I would need a group in Azure AD that contains those users as members that are members of two other groups. That means I need an intersection of two groups. I know for one group...
BilalelHadd
Jul 07, 2022Iron Contributor
Hi fomar2130,
Please keep in mind that this feature has some limitations yet. Read more about the limitations on this official Microsoft docs page:
https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-rule-member-of
Below you will find the needed query to create a Dynamic group with members of Group A and Group B as members for the newly created Dynamic group:
user.memberof -any (group.objectId -in ['ObjectIDGroupA', 'ObjectIDGroupB'])
Please keep in mind that this feature has some limitations yet. Read more about the limitations on this official Microsoft docs page:
https://docs.microsoft.com/en-us/azure/active-directory/enterprise-users/groups-dynamic-rule-member-of
Below you will find the needed query to create a Dynamic group with members of Group A and Group B as members for the newly created Dynamic group:
user.memberof -any (group.objectId -in ['ObjectIDGroupA', 'ObjectIDGroupB'])