Author: onecurlyfry | Posted on: 10/5/2009 1:37:09 PM | Views : 272

I'm sure this is pretty simple, but I'm missing something here.
I connect with our active directory without a problem using the following code (note - i found this online, it works. I have a book on AD Directory Services class, but at this point the code below works, without a full understanding of how it works. Until this project is complete, i'm on "make it work, learn how later" mode).

Dim authorizedUser As String = username Dim phoneNum As String = "" Dim entry As New DirectoryEntry(System.Configuration.ConfigurationManager.ConnectionStrings("ADConnectionString").ConnectionString) Dim search As New DirectorySearcher(entry) search.Filter = "(SAMAccountName=" & authorizedUser & ")" search.PropertiesToLoad.Add("telephonenumber") Dim result As SearchResult = search.FindOne() ...

Go to the complete details ...