IADsUser Method: Groups

Groups() As IADsMembers;

Description
Returns a collection of Group objects representing the groups that a user is a member of.

Return Values
IADsMembers that can enumerate group objects.

Example

Dim GroupObject As IADsGroup
Dim UserObject As IADsUser
Dim Members As IADsMembers
Set UserObject = GetObject("NTDS://YourDomainName/UserName")
Set Members = UserObject.Groups
For Each GroupObject In Members
Debug.Print GroupObject.Name
Next

 

See Also