I know the SAMAccountName, and now want to populate a list of groups with entries that reflect this user's group membership across the whole directory. Here's my start, but I'm stumped:
Dim path As String = WebConfigurationManager.AppSettings("ldapPath")
Dim entry As New DirectoryEntry(path)
Dim search As DirectorySearcher = New DirectorySearcher(entry)
Dim groupList As StringBuilder = New StringBuilder()
search.Filter = "(SAMAccountName=" & _thisUser.UserName & ")"
search.PropertiesToLoad.Add("memberOf")
'search.SearchScope = SearchScope.Subtree
For Each res As SearchResult In search.FindAll
Next ''Just doing this so I can look at "res" objects in debug
I've no idea how to traverse this. Please, any pointers?