IADsUser Method: Groups

Groups() As IADsMembers;

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

Return Values
IADsMembers that can enumerate group objects.


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


See Also

[an error occurred while processing this directive]