How to Require Microsoft 365 Users to Change Password at First Sign-In
Question details
IT administrators need to ensure that new or existing Microsoft 365 users are prompted to change their passwords upon their first login, particularly after MFA is enabled or when syncing from an on-premises Active Directory.

- Product
- Microsoft 365
- Device & OS
- not provided
- Scenario
- Configuring new user accounts or resetting passwords for Microsoft 365 users synchronized via Azure AD Connect.
- Observed behavior
- Users are not receiving the expected prompt to change their password during their first Microsoft 365 sign-in, despite the "User must change password at next logon" option being selected in the on-premises Active Directory.
Ensure you have administrator access to the Microsoft 365 admin center, Azure AD Connect, and the on-premises Active Directory module for PowerShell.
Set pwdLastSet to 0 via PowerShell (On-Premises AD)
Force a password change prompt in Microsoft 365 by resetting the password and altering the pwdLastSet attribute in your on-premises Active Directory.
If you are using Azure AD Connect to synchronize your on-premises directory with Microsoft 365, the standard 'User must change password at next logon' checkbox may only affect local Windows sign-ins. To trigger the Microsoft 365 prompt, you must explicitly clear the pwdLastSet attribute.
Launch Windows PowerShell with Administrator privileges on your Active Directory server.
Use the Set-ADAccountPassword cmdlet to reset the target user's password.
Execute the command: Set-ADUser -Identity "username" -Replace @{pwdLastSet=0} to force the password reset flag.
Ensure that the user account does not have the DONT_EXPIRE_PASSWORD flag enabled, as this will override the reset prompt.
Allow Azure AD Connect to synchronize these attribute changes to Microsoft 365.

Require Password Change via Microsoft 365 Admin Center
For cloud-only users, you can directly check the option to require a password change when creating or resetting a user account.
Simplify Your Document Workflow with WPS Office
While managing enterprise directories and security policies requires specific Microsoft admin tools, your daily document tasks don't need to be expensive or complex. WPS Office provides a lightweight, highly compatible, and free alternative to Microsoft Office for creating and editing Word, Excel, and PowerPoint files.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the installer and follow the on-screen prompts to set up the software suite in minutes.
- 3. Open Your Office Documents: Double-click any existing Microsoft Office file to open it natively in WPS Office and start editing immediately.

Frequently Asked Questions
Why doesn't the on-premises AD 'User must change password' option trigger a Microsoft 365 prompt?
By default, checking this flag forces a password change during a local Windows sign-in. However, it does not always map directly to the Azure AD authentication flow unless the pwdLastSet attribute is explicitly set to 0 and synchronized via Azure AD Connect.
Do Conditional Access policies affect password change prompts?
Conditional Access policies manage access controls (such as requiring MFA) but do not inherently replace administrative password reset flags. However, if security defaults are disabled in favor of Conditional Access, you must ensure your administrative password reset policies are properly configured.
How long does it take for password policies to sync to Microsoft 365?
While standard password hash synchronization via Azure AD Connect typically occurs every 2 minutes, full attribute changes like pwdLastSet follow the standard delta sync cycle, which runs every 30 minutes by default.
What happens if a user has the DONT_EXPIRE_PASSWORD flag enabled?
If this flag is enabled in Active Directory, it overrides the requirement to change the password. This will prevent Microsoft 365 from prompting the user to update their credentials at their next sign-in.




