ADSI: Get Group Membership for Account
10/12/2004 1:28:41 PM
This code snippet will obtain the security groups that a user account belongs to.
Dim strDomain = “mydomain“ Dim strUser = “someuser“
Function GetMemberGroups() Dim oUser = GetObject(strDomain & "/" & strUser) Dim strTemp For Each oGroup In oUser.Groups strTemp = strTemp & oGroup.Name & "<br>" Next GetMemberGroups = strTemp End Function
|