Authenticating against the AD

Jan 15, 2013 at 2:40 PM

Am I able to authenticate against the AD using LinqtoLDAP?

E.g., can I do something similar to this

var user = context.Query<User>().FirstOrDefault(u => u.SAMAccountName == "user123" && u.Password == "1234");


Coordinator
Jan 17, 2013 at 2:40 AM
Edited Jan 17, 2013 at 2:45 AM

No, that won't work.  Passwords are write only in AD and can only be changed over SSL.  Is there a reason why you have to authenticate this way and not use NTLM or Kerberos?

Feb 14, 2013 at 4:37 AM
Actually, what I needed is this:

using(PrincipalContext pc = new PrincipalContext(ContextType.Domain, "YOURDOMAIN"))
{
// validate the credentials
bool isValid = pc.ValidateCredentials("myuser", "mypassword")
}

No SSLs needed, right?