A cloud-based identity and access management service for securing user authentication and resource access
This is expected (with PHS). Entra Connect transfers the password hash to Microsoft Entra ID, but the subsequent cloud authentication does not contact your domain controllers. Microsoft Entra therefore has no real-time knowledge of whether the AD password has subsequently expired or whether the on-premises account has reached its accountExpires date. accountExpires is not synchronized by Entra Connect.
If you require cloud sign-in to respect the current state of the on-premises password, Pass-through Authentication is the cleaner solution. PTA sends the authentication request through the PTA agent to on-premises AD, allowing AD to make the decision about password validity and account lockout. This means an expired password or locked account can prevent authentication to Microsoft 365 and other Entra-integrated applications. The downside is that authentication now depends on your on-premises PTA infrastructure, so you should deploy multiple agents and consider the resilience implications before making the change.
If you want to keep PHS, you can instead configure Microsoft Entra to apply a password lifetime to synchronized users. Enable CloudPasswordPolicyForPasswordSyncedUsersEnabled and configure the password-validity period on the Entra domain to correspond with your AD policy:
Connect-MgGraph -Scopes "OnPremDirectorySynchronization.ReadWrite.All"
$sync = Get-MgDirectoryOnPremiseSynchronization
$sync.Features.CloudPasswordPolicyForPasswordSyncedUsersEnabled = $true
Update-MgDirectoryOnPremiseSynchronization `
-OnPremisesDirectorySynchronizationId $sync.Id `
-Features $sync.Features
Then configure the domain:
Update-MgDomain `
-DomainId "<domain name>" `
-PasswordValidityPeriodInDays <days> `
-PasswordNotificationWindowInDays <days>
There is a timing consideration with this approach. For users who are already synchronized, the change does not alter their existing password-expiration setting. The relevant user state is updated following a subsequent password change and password-hash synchronization.
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin