GroupMembershipControl is used in the input data object of both the get API and the update API.
In the get API, GroupMembershipControl is used to request the groups that an entity belongs to. If theGroupMembershipControl is added to the input data object, the groups the entity belongs to are returned. GroupMembershipControl can also be used to specify the properties to be returned for groups as well as the level of nested groups to be returned.
Because GroupMembershipControl is extended from SearchControl, you can specify properties to return only the groups that satisfy the search criteria. For example, you can add property expression with value: “entities[@xsi:type='Group' and cn='Admin*']” to return only the groups whose “cn” property starts with “Admin”.
GroupMembershipControl level | Description |
---|---|
1 (default) | Returns immediate groups only. |
0 | Returns all nested groups |
GroupMembershipControl modifyMode | Description |
---|---|
1 (default) | Assign Mode. The groups contained in the entity data object add the entity as a member. |
2 | Replace Mode. The groups contained in the entity data object add the entity as a member and all the existing members are removed. |
3 | Unassign Mode. The groups contained in the entity data object remove the entity from their members. |
data object <xsd:complexType name="GroupMembershipControl"> <xsd:complexContent> <xsd:extension base="GroupControl"> </xsd:extension> </xsd:complexContent> </xsd:complexType>
<wim:controls xsi:type="wim:GroupMembershipControl" level="1"> <wim:properties>cn</wim:properties> <wim:properties>displayName</wim:properties> </wim:controls>
<wim:controls xsi:type="wim:GroupMembershipControl" modifyMode="3"/>