Friday, January 5, 2018

Active Directory authentication using C#

bool authenticated;
using(PrincipalContext pc =newPrincipalContext(ContextType.Domain, domain.ToString()))
{
     authenticated = pc.ValidateCredentials(<user name>,<password>,ContextOptions.Negotiate);
}
if (authenticated)
{

}

No comments:

Post a Comment

Thank you for your comment.