Tuesday, April 28, 2020

Use System.DirectoryServices.AccountManagement to verify the password of a user in .NET Core.

using (PrincipalContext pc = new PrincipalContext(ContextType.Domain))
{
   bool isValid = pc.ValidateCredentials(username, password);
   if (isValid)
   {

No comments:

Post a Comment