Skip to content

Account states and password change

The directory (Active Directory) knows more about an account than just the fact that it exists and has a password. When it reports that something is wrong with the account, the provider shows it plainly and does not ask for a code until the matter is resolved.

State in the directory What the user sees
password change required the message "Your password in the directory must be changed before you can sign in.", and — once the system has decided — the new-password fields
account disabled the message "This account is disabled in the directory."
account expired the message "This account has expired in the directory."
account locked the message "This account is locked in the directory."
password expired the password-change path — the message "Your password in the directory has expired. Change it to sign in."

The texts of these messages live in the translation files under identifiers 47–50 (account states) and 65 (password expired); identifier 51 is the passwords-do-not-match text in the change form, not an account state. All are translated into all interface languages (Polish, English, German, Spanish, French, Chinese).

Changing a password the directory requires

When the directory requires a password change, the provider does not change the password itself. The order is this:

  1. The provider hands Windows the login attempt with the current password. The system then decides STATUS_PASSWORD_MUST_CHANGE — and that is the moment Windows knows the password has to be changed. First the system message appears:

Windows message: "The user's password must be changed before signing in." with OK and Cancel buttons

  1. After confirming, the provider shows the new-password fields together with the message from the directory. The account name above the fields is the one given in the first step, and the current password is masked — its value is never shown.

Password-change form: the account name, the message "Twoje hasło w katalogu wymaga zmiany, zanim się zalogujesz." ("Your password in the directory must be changed before you can sign in." in the English product), the "Nowe hasło" field ("New Password" in the English product), the "Potwierdź hasło" field ("Confirm password" in the English product) and a Cancel button

  1. After the change, sign-in completes without being asked for the password again.

This order has a reason: if the provider decided the password change itself and sent the change packet earlier, Windows would treat it as an ordinary sign-in and would not set its own state. The login attempt handed to the system is one-time per flow — otherwise the process could loop if the system did not set that state.

Password changes are not passed as command-line arguments. Passwords, PINs and OTPs are never logged, including at the debug level.