Entra Connect Sync has created a second user with .onmicrosoft.com domain and status synched. How do I move the synchd status to the primary user

Mark Lane 40 Reputation points
2025-10-24T01:16:21.9533333+00:00

We have Entra Connect Sync installed to sync On Prem AD user with the corresponding Entra ID user. Creating an on prem user in the On Prem users and computers has resulted in a second user being created being created in the Entra ID with the .onmicrosoft.com domain. This user is showing as On Premise Sync Enabled. The primary user does not have the On Premise Sync property enabled

How do I change the On Premise Sync Enabled flag to the primary user and delete the .onmicrosoft.com user

Microsoft Security | Microsoft Entra | Microsoft Entra ID
0 comments No comments
{count} votes

Answer accepted by question author
  1. Monalisha Jena 2,965 Reputation points Microsoft External Staff Moderator
    2025-10-24T06:56:58.8833333+00:00

    Hello Mark Lane,

    Welcome to Microsoft Q&A Platform. Thank you for reaching out & hope you are doing well. 

    I will try to clarify your doubts and will try to give you some workarounds. So, this issue occurs when soft match or hard match between Entra ID and Active Directory fails:

    Soft Match links users by comparing UserPrincipalName or ProxyAddresses.

    Hard Match links users by comparing ImmutableId (mS-DS-ConsistencyGuid in AD).

    If the existing Entra user already has an ImmutableId value (set previously), the sync would reject the match and create a duplicate .onmicrosoft.com account with DirSyncEnabled = True, while the intended user stays cloud-only (DirSyncEnabled = False)

    Will recommend you to check some points as What are the UserPrincipalName and Primary SMTP address values for both users? Does the cloud (primary) user show DirSyncEnabled = False in Entra Admin Center? Does the .onmicrosoft.com user exist in the synced OU in Active Directory? Which attribute is configured as the sourceAnchor in Entra Connect (check via PowerShell)? Are there duplicate proxyAddresses or userPrincipalName values between these two accounts?

    Because all these help determine if you can perform a soft match (via UPN/email match) or need a manual hard match (via ImmutableId alignment).

    Till then will propose you both the workarounds to try as below:

    Soft Match: In Active Directory Users and Computers, ensure the userPrincipalName and ProxyAddresses match exactly the cloud user's attributes.

    Delete the .onmicrosoft.com duplicate user from Entra ID.

    Force a delta sync on the Entra Connect server: for e.g.

    Start-ADSyncSyncCycle -PolicyType Delta
    

    The connector will now soft match the on-prem user with the existing cloud account.

    All the steps and more understanding: https://free.blessedness.top/en-us/entra/identity/hybrid/connect/how-to-connect-syncservice-features

    Hard Match (Manual Alignment):

    Get the ImmutableId of the desired Entra cloud user:

    Get-MgUser -UserId ******@domain.com | Select-Object ImmutableId
    

    Convert the on-prem AD user’s ObjectGUID to Base64 and set it as the ImmutableId in Entra:

    $guid = (Get-ADUser user@domain.local).ObjectGuid $immutable = [System.Convert]::ToBase64String($guid.ToByteArray()) Set-MsolUser -UserPrincipalName "******@domain.com" -ImmutableId $immutable
    

    Run a delta sync again and verify that On-premises sync enabled now appears on the correct primary account.​

    Once matched successfully, delete the orphaned .onmicrosoft.com account permanently.

    NOTE: Deleting the duplicate user should only happen after confirming no licenses or data are tied to it.

    Reference: https://free.blessedness.top/en-us/entra/identity/hybrid/connect/tshoot-connect-sync-errors

    https://free.blessedness.top/en-us/entra/identity/hybrid/connect/how-to-connect-syncservice-features

    Hope this helps! If it answered your question, please consider clicking Accept Answer and Upvote. This will help us and others in the community as well. If you need more info, feel free to ask in the comments. Happy to help!

    Regards,

    Monalisha

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Mark Lane 40 Reputation points
    2025-10-25T22:24:32.32+00:00

    Hi Monalisha,

    Thank you very much for your reply. I have been able to solve the problem by using your hard match solution above.

    Thanks again,

    Mark Lane

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.