Sync Existing Microsoft 365 Users with Entra Connect and Password Hash Sync
Question details
Configure directory and password synchronization for existing Microsoft 365 users when the on-premises domain differs from the email domain.

- Product
- Microsoft Entra Connect Sync and Microsoft 365
- Device & OS
- not provided
- Scenario
- An organization wants to synchronize on-premises Active Directory accounts with existing cloud users without creating duplicate identities.
- Observed behavior
- Existing cloud users should be matched to their on-premises accounts and use synchronized password hashes for cloud sign-in.
Inventory the existing cloud users and their on-premises counterparts, including UPNs and primary SMTP addresses. Verify the public sign-in domain in Microsoft 365 and check Microsoft’s current Entra Connect prerequisites and identity-matching restrictions before enabling synchronization.
Match Existing Users and Enable Password Hash Sync
Use Microsoft Entra Connect Sync to link eligible on-premises accounts to existing Microsoft 365 users and synchronize password hashes.
Microsoft Entra Connect Sync is the successor to Azure AD Connect and DirSync. Matching UPNs can support soft matching, but matching is subject to source-anchor, uniqueness, and security restrictions; a matching UPN alone does not guarantee a match.
Changing a user's UPN suffix does not require renaming the on-premises Active Directory domain. Plan the sign-in name change with affected users and test a small group before expanding synchronization.
In the Microsoft 365 admin center, open Settings > Domains and verify the public domain, such as xyz.com. Open Users > Active users and record the sign-in name and primary email address of each existing user.
On a system with Active Directory management tools, open Active Directory Domains and Trusts. Right-click the top-level Active Directory Domains and Trusts node, select Properties, and add xyz.com as an alternative UPN suffix.
Open Active Directory Users and Computers, select a pilot user, and open Properties > Account. Set the user logon name and suffix to match the intended Microsoft 365 UPN, such as user@xyz.com. Check that UPNs and primary SMTP addresses are unique.
Install Microsoft Entra Connect Sync on a supported server and choose Customize in the setup wizard. Connect to the Microsoft Entra tenant and on-premises directory, select userPrincipalName as the sign-in attribute, scope synchronization to the pilot users, and enable Password Hash Synchronization.
After the initial synchronization, open Users > Active users in the Microsoft 365 admin center and confirm that the intended existing users are synchronized. Review synchronization errors and test cloud sign-in with an on-premises password before expanding the scope.

Use WPS Office for Documents During a Microsoft 365 Migration
WPS Office is a free, lightweight alternative with a familiar interface and Microsoft Office format compatibility, making it easier to move document work between suites. It does not replace Microsoft Entra Connect or synchronize Microsoft 365 identities and passwords.

Frequently Asked Questions
Do I have to rename my local Active Directory domain?
No. In Active Directory Domains and Trusts, add the verified public domain as an alternative UPN suffix, then assign it to users in Active Directory Users and Computers.
Will matching UPNs always link an existing Microsoft 365 user?
No. Matching UPNs can support soft matching, but conflicts, source-anchor settings, and security restrictions can prevent it. Check synchronization errors and confirm the result with a pilot user.
What happens to existing cloud passwords after password hash synchronization?
When a matched user's password hash is synchronized, the on-premises password can replace the existing cloud password for sign-in. Enable Password Hash Synchronization in the Entra Connect setup wizard and test with a pilot account.
Can a primary email address help match an existing user?
Yes. An eligible existing cloud user may be soft-matched using a matching primary SMTP address, subject to Microsoft Entra matching rules and restrictions. Check the addresses for uniqueness before synchronizing.




