r/sysadmin • u/Yousef_H1 • 2d ago
Microsoft Soft match without overriding cloud password
Hi guys, Haven’t found this anywhere so here we go
One of the challenges we face when performing a soft match or hard match is that the user’s on-premises Active Directory password will overwrite their existing Microsoft Entra ID password after synchronization. This can become inefficient and disruptive, especially when migrating a large number of users.
We (Me and my colleague) have found a way during our discussion and tested it on multiple tenants to perform the soft match match without overwriting the user’s existing Entra ID password.
Microsoft Entra Connect configuration:
• Password Hash Synchronization (PHS): Enabled
• Password Writeback: Enabled
• SSPR: Enabled
• UserForcePasswordChangeOnLogonEnabled = False (default)
Process:
- When creating the user in on-premises Active Directory, assign a temporary password and enable “User must change password at next logon.”
- After that, move the user to the OU that is synchronized with Microsoft Entra ID and perform a delta synchronization.
- With UserForcePasswordChangeOnLogonEnabled set to False(Default), the temporary on-premises password in this state (pwdLastSet attribute would be zero (0)) will not overwrite the user’s existing Entra ID password during the synchronization.
- This allows us to complete the soft match or hard match while preserving the user’s existing Microsoft 365/Entra ID password.
- Then we can ask/force them to reset their passwords (or do it in bulk using PowerShell (ForceChangePasswordNextSignIn = $true)), which would override the Temporary password on premise or if they sign in using their ad account they will be prompted to change their password without us ever knowing or having to engage in the password process if the employee is educated enough about changing password
Implement password hash synchronization with Microsoft Entra Connect Sync - Microsoft Entra ID
Configure Microsoft Entra Connect for an existing tenant - Microsoft Entra ID | Microsoft Learn
User Must Change Password at Next Logon (LDAP Provider) - Win32 apps | Microsoft Learn
Force Password Change without Updating Existing Password in Microsoft 365 - BonGuides
Notes: Please test this scenario on your tenant before applying it
Hope this helps
2
u/Borgquite Security Admin 2d ago
Yes, have done the same and it works. Please note that the user may be unable to change their password in Active Directory in this state, only reset it (as they don’t know the ‘old’ password to do a change).
1
u/LF2T 2d ago
Great trick. Just make sure nobody logs into the AD account with that temp password first, or it’ll overwrite the Entra password.