DirectoryServices VB

  • Thread starter Thread starter LR
  • Start date Start date
L

LR

I have created a vb application to retrieve User information from AD using
DirectoryServices and it retrieves the default properties ok.

Dim entry As New DirectoryServices.DirectoryEntry _

("LDAP://" & strserver & "/ou=OU_XP_Users,dc=corp,dc=romtech,dc=com")

Dim mySearcher As New DirectoryServices.DirectorySearcher(entry)

Dim result As DirectoryServices.SearchResult

The problem is when I use the
PropertiesToLoad.Add("phone") for sdditional properties the
DirectoryServices findone only returns the adspath.

How do I return additional properties?



Thank you
 
The problem is when I use the
PropertiesToLoad.Add("phone") for sdditional properties the
DirectoryServices findone only returns the adspath.

How do I return additional properties?

You need to use the proper LDAP attribute names! This property is
called "telephoneNumber" in LDAP - try it, should work (if a value is
set).

In order to find out all the LDAP attribute names, consult the MSDN
docs on LDAP and DirectoryEntry.

You can also look up a really nice listing of LDAP attribute names and
related stuff at Richard Mueller's web site at :
http://www.rlmueller.net/UserAttributes.htm

And you could also download my ADSI Browser called "BeaverTail" from
http://adsi.mvps.org/adsi/CSharp/beavertail.html
and browse your AD store and look for the attributes set on various
users, groups, OU's, etc.

Marc

________________________________________________________________
Marc Scheuner ** mscheuner -at- mvps.org ** http://adsi.mvps.org
Microsoft MVP for Directory Services Programming
http://www.dirteam.com/blogs/mscheuner/default.aspx
Come see http://groups.yahoo.com/group/ADSIANDDirectoryServices/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top