user.memberof with dynamic grouping

Dharmy 1 Reputation point

Hi folks

I am desperately trying to solve this problem and nothing I've searched for seems to help. I want to find an intersection of 2 security groups and add only those members to a dynamic group. I am using the rule syntax editor in AzureAD

the only samples I can find are the following, but that adds everyone - essentially doing a 'union' of both base groups. How do I only find the intersection?

user.memberof -any (group.objectId -in [‘groupId’, ‘groupId’])   

Also, I understand I can't intersect dynamic groups - in this case, these are manually created security groups.

Any help would be highly appreciated!

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
19,866 questions
{count} votes