Directory Services

Enumerating Members in a Group

The members of a group are stored in a multi-value property called a member. For groups with a small to medium-sized membership, use the IADsGroup::Members method to get a pointer to an IADsMembers object that contains the list of all members. Then use the IADsMembers::get__NewEnum to get an enumerator object that you can use to enumerate the members.

If the projected group membership will contain 1000 or more members, use ranging to retrieve users one range at a time. For more information about using ranging to enumerate members, see Enumerating Groups that Contain Many Members.