Author: coolvaas1 | Posted on: 1/12/2007 7:28:23 PM | Views : 309

I have a requirement to retreive all the active directory users when a specific user group isentered.
And I have the following code that does that. But my problem is it retreives everything but the user id.
How do I get only the user id? Please help.
    Public Function GetADGroupUsers(ByVal groupName As String) As ArrayList
        Dim result As SearchResult
        Dim search As DirectorySearcher = New DirectorySearcher()
        search.Filter = String.Format("(cn={0})", groupName)
        search.PropertiesToLoad.Add("member")
        result = search.FindOne()
        Dim userNames As ArrayList = New ArrayList()
        If result Is Nothing Then
  & ...

Go to the complete details ...