Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- domainAndUsername = domain + @"" + username;
- entry = new DirectoryEntry(_path, domainAndUsername, pwd);
- entry.AuthenticationType = FindAuthTypeMicrosoft(authType);
- DirectoryEntry entry = new DirectoryEntry("LDAP://server-name/DC=domainContext,DC=com");
- entry.Username = @"DOMAINaccount";
- entry.Password = "...";
- DirectorySearcher searcher = new DirectorySearcher(entry);
- searcher.Filter = "(&(objectClass=user)(sn=Jones))";
- SearchResultCollection results = searcher.FindAll();
Add Comment
Please, Sign In to add comment