Manager Search for LDAP User

I want to be able to find who is the manager for a particular user. I have no idea where to start. Please, help.

+3
source share
2 answers

A property of the managerassociated user object is a user DNobject representing the user manager.

0
source

You need to know what your LDAP path is for your user - if you do not know, you can download my LDAP BeaverTail browser .

enter image description here

, LDAP- , : LDAP Manager:

DirectoryEntry deUser = new DirectoryEntry("LDAP://cn=John Doe,cn=Users,dc=YourCorp,dc=com");

if(deUser != null)
{
   // check if the manager property is set - it could be NULL (no manager defined)
   if(deUser.Properties["manager"] != null)
   {
      string managerDN = deUser.Properties["manager"][0].ToString();
   }
}

Manager " " (DN) - LDAP - DirectoryEntry.

+2

All Articles