title: Checking validity of the user password when the password is expired in Active direcory
body: <p>I’m working in a scenario where the user password is already expired in Active Directory. I’m trying to check if the user has entered the valid username and corresponding valid but expired password or not. If the user enters the valid user name and correct expired password, I’ll be redirecting them to a page where they can reset the password. However, if the user enters wrong expired password, then the user should be notified with standard  message <code>UserName and or password is not correct</code>. I checked online and they are talking about using <code>validatecredentials</code> method  after  setting <code>pwdLastSet</code> to -1 to disable <code>user must change password at next logon</code>.</p>
  
  <p><a href="https://stackoverflow.com/questions/8975118/how-to-check-ad-user-credentials-when-the-user-password-is-expired-or-user-must">How to check AD user credentials when the user password is expired or &quot;user must change password at next logon&quot;</a></p>
  
  <p>Will this approach allows me to check the validity of the expired password? I tried this approach and it does not seem to be working for me.</p>