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 UserName and or password is not correct
. I checked online and they are talking about using validatecredentials
method after setting pwdLastSet
to -1 to disable user must change password at next logon
.
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.