GroupMembershipControl DataObject
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”.
- properties
- is a list of the attributes you want to return from the entities which match the search criteria. For example, you want to get the sn and givenName attributes of the persons who is in marketing department.
- searchBases
- is a list of the search bases used to limit the search to those bases specified in the list.
- countLimit
- specifies the maximum number of search results returned by the search operation.
- timeLimit
- If the profile repository supports timeLimit, it specifies in milliseconds the maximum duration of the search.
- expression
- is the search expression in XPath format.
- level
- is used for indicating the level of the nested groups to return. The default value for level is 1. See the following table.
GroupMembershipControl level | Description |
---|---|
1 (default) | Returns immediate groups only. |
0 | Returns all nested groups |
- modifyMode
- specifies to use the assign, modify or unassign mode. See the following table.
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. |
XML schema definition
data object <xsd:complexType name="GroupMembershipControl">
<xsd:complexContent>
<xsd:extension base="GroupControl">
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
Sample data objects
<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"/>