Working with Entra ID memberOf & Transitive membership
While creating assignments for policies in Intune as part of a project, something caught my attention, which got me intrigued. In Entra ID, there are multiple ways membership in the groups are evaluated and I wanted to explore all possible options.
Let's start with Transitive membership
Transitive memberships is basically indirect memberships, where objects are evaluated through the membership of other groups. As a result, objects in the sub-group are members of both groups.
To demonstrate this through an example, I created an Entra ID group containing other groups.
Intune - All Cloud PCs - It is a dynamic group containing all cloud PCs
Intune - All Mobile Devices - It is a dynamic group containing all enrolled iOS and Android devices.
These groups were added to another group called - Intune All MDM Lab Devices Transitive
As a result when you check the membership of devices, based on the evaluation of the conditions, you will be able to see whether the group membership evaluated as Transitive or not.
In case of a Cloud PC -
In case of a mobile device -
This is pretty neat in my opinion as one can now identify how the object got evaluated just by looking at the membership state in Intune.
We move on to the next method which is memberof membership
This membership type enables admins to create dynamic groups by adding members of other groups using the memberOf attribute. Only administrators in the Global Administrator, Intune Administrator, or User Administrator role can use the memberOf attribute to create an Entra ID dynamic group. One must have an Azure AD Premium license for the Entra ID tenant. However, this feature is still in preview and does come with its own set of limitations.
-Each Entra ID tenant is limited to 500 dynamic groups using the memberOf attribute.
-memberOf groups do count towards the total dynamic group member quota of 5,000.
-Each dynamic group can have up to 50 member groups.
-When adding members of security groups to memberOf dynamic groups, only direct members of the security group become members of the dynamic group.
-You can't use one memberOf dynamic group to define the membership of another memberOf dynamic groups. For example, Dynamic Group A, with members of group B and C in it, can't be a member of Dynamic Group D).
-MemberOf can't be used with other rules. For example, a rule that states dynamic group A should contain members of group B and also should contain only users located in Redmond will fail.
-Dynamic group rule builder and validate feature can't be used for memberOf at this time.
-MemberOf can't be used with other operators. For example, you can't create a rule that states “Members Of group A can't be in Dynamic group B.”
-MemberOf isn't yet supported in the rule builder
The syntax that is currently supported -
Example user rule: user.memberof -any (group.objectId -in ['groupId', 'groupId'])
Example device rule: device.memberof -any (group.objectId -in ['groupId', 'groupId'])
I put this to test and here are the results -
First, I extracted the groupid information of the intended groups. This can easily be done directly from the portal.
Intune - All Cloud PCs
Intune - All Mobile Devices
After that I used these values to formulate the dynamic query for the memberof group. Remember that you cannot use rule builder and have to be done manually by editing the query.
Also, validation will not work as it appears that the backend evaluation is not yet supported for validation of the memberof attribute at the moment.
However, rest assured, if the values and the syntax are correct, then evaluation will go through successfully.
Final thoughts..
The flexibility around grouping is great now. In my opinion, this certainly makes assignments very easy. However, when it comes to assignments in Intune, I will still encourage to use Device filters as much as possible. It just removes the dependency on the evaluation of Entra ID groups thus eliminating all kind of latencies. I blogged about my experience working with filters a while back and you can read all about it over here.
Thank you, this helped me today :-)
ReplyDeleteGlad the post was helpful.
DeleteThis comment has been removed by a blog administrator.
ReplyDeleteBy "MemberOf can't be used with other operators". Does that mean I can't do something like user.memberof -any (group.objectId -in ["..."])
ReplyDelete-and (user.extensionAttribute1 -eq "CEO"). If so this feature is of fairly limited use for me... Latency is not really an issue for me in this case, I'd like to use this for group baed licensing stuff...