path for DirectoryEntry

G

Guest

Hi All

I have a directory server hosting multiple OUs, and I found that all the
users I created under each OU will not appear under "Users" folder, which
looks fine to me until now. I am working on an ASP.NET application which
would allow a selected user from each OU to login and to update profiles of
users' of his/her own OU.
To authenticate the user I am going to use the following code

DirectoryEntry entry = new DirectoryEntry(path, username, password)

then I will just bind it to the NativeObject, right?

But my question is, how would the path be for the "admin" user of different
OUs? i.e. do I need to specify the CN, DC in the path

for example, the domain is "xyz.com", the OUs are "NA1", "NA2","EU1", "EU2",
and server name is "SRVNA", how would the path looks like for user
"Jonathan" under "NA1"?


Many Thanks

--
 
J

Joe Kaplan \(MVP - ADSI\)

If you just want to use LDAP for authentication, you can simply bind to the
RootDSE object on the server. As long as the password provided isn't blank,
that will effectively validate the user's credentials. Once they are
validated, if you need to read attributes from their user object, the way to
go would be to search for it with the DirectorySearcher by their user name
that was provided.

Joe K.
 

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

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top