Password & Account Recovery

How to Require Microsoft 365 Users to Change Password at First Sign-In

Algirdas JasaitisAlgirdas Jasaitis Nov 2, 2026 869 views

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.

Require Microsoft 365 Users to Change Password at First Sign-In
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.
Before you start

Ensure you have administrator access to the Microsoft 365 admin center, Azure AD Connect, and the on-premises Active Directory module for PowerShell.

Solution 1Recommended

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.

1
Open PowerShell

Launch Windows PowerShell with Administrator privileges on your Active Directory server.

2
Reset the User Password

Use the Set-ADAccountPassword cmdlet to reset the target user's password.

3
Modify the pwdLastSet Attribute

Execute the command: Set-ADUser -Identity "username" -Replace @{pwdLastSet=0} to force the password reset flag.

4
Check Password Expiration Flags

Ensure that the user account does not have the DONT_EXPIRE_PASSWORD flag enabled, as this will override the reset prompt.

5
Wait for Directory Synchronization

Allow Azure AD Connect to synchronize these attribute changes to Microsoft 365.

Set pwdLastSet to 0 via PowerShell (On-Premises AD)
Synchronization Delay: It may take up to 30 minutes for Azure AD Connect to sync these changes to Microsoft 365, depending on your environment's standard delta sync cycle.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install WPS Office: Run the installer and follow the on-screen prompts to set up the software suite in minutes.
  3. 3. Open Your Office Documents: Double-click any existing Microsoft Office file to open it natively in WPS Office and start editing immediately.
Fully compatible with Microsoft Office formats (.docx, .xlsx, .pptx) for seamless file sharing.Lightweight installation with fast loading times and zero bloatware.Familiar user interface requiring no learning curve for former Microsoft Office users.Completely free for standard daily office tasks, saving software licensing costs.
microsoft office alternative - wps office

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.