If I installed the .NET DirectoryEntry.Path on something like:
LDAP:
Everything works fine, and I get the DirectoryEntry I need. However, I do not know the true common username (CN). I only know their username, "John.Smith".
So how can I request a username? I tried all of the following without success:
LDAP://CN=John.Smith,OU=Group Name,DC=example,DC=com LDAP://sAMAccountName=John.Smith,OU=Group Name,DC=example,DC=com LDAP://userPrincipalName=John.Smith,OU=Group Name,DC=example,DC=com LDAP:// userPrincipalName=John.Smith@example.com ,OU=Group Name,DC=example,DC=com LDAP://uid=John.Smith,OU=Group Name,DC=example,DC=com LDAP://o=John.Smith,OU=Group Name,DC=example,DC=com
source share