Odd user sync situation, not sure how to resolve.

%3CLINGO-SUB%20id%3D%22lingo-sub-2544056%22%20slang%3D%22en-US%22%3EOdd%20user%20sync%20situation%2C%20not%20sure%20how%20to%20resolve.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2544056%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20sure%20similar%20situation%20have%20come%20up%2C%20but%20I%20haven't%20come%20across%20anything%20that%20quite%20fits%20this%20situation.%20It%20would%20be%20best%20if%20I%20just%20lay%20out%20what%20led%20up%20to%20this%20mess%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENew%20employee%20was%20hired.%20His%20user%20was%20setup%20in%20AD%2C%20synced%20to%20O365%2C%20email%20setup%2C%20everything's%20fine.%3C%2FP%3E%3CP%3ELiterally%20that%20night%20the%20domain%20controller%20crashed%20and%20had%20to%20be%20restored%20from%20backup.%3C%2FP%3E%3CP%3ENewly%20created%20user%20was%20lost%20in%20local%20AD.%3C%2FP%3E%3CP%3ESomeone%20recreated%20his%20local%20AD%20user%20(presumably%20incorrectly%2C%20or%20at%20least%20without%20consideration%20of%20what%20would%20happen%20on%20O365%20end).%3C%2FP%3E%3CP%3ENew%20local%20AD%20user%20synced%2C%20creating%20a%20second%20O365%20user%20that%20has%20all%20of%20his%20permissions%2C%20but%20incorrect%20UPN%20and%20no%20email%20or%20licensing.%3C%2FP%3E%3CP%3EOriginal%20orphaned%20O365%20user%20does%20not%20have%20permissions%2C%20but%20has%20correct%20UPN%20and%20the%20user's%20email%20and%20license.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EBoth%20users%20show%20as%20synced%20with%20on-premises%20AD%20and%20cannot%20be%20modified%20or%20deleted%20in%20the%20admin%20center%20as%20a%20result.%20How%20do%20we%20merge%20the%20two%20O365%20users%20into%20one%20that%20is%20actually%20linked%20to%20the%20existing%20local%20AD%20user%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20it%20would%20be%20easier%20to%20download%20his%20email%20(there%20likely%20isn't%20much%2C%20if%20any)%2C%20complete%20wipe%20his%20O365%20user(s)%2C%20and%20resync%20him%20to%20a%20whole%20new%20user%2C%20that%20would%20also%20be%20acceptable%2C%20just%20not%20sure%20how%20to%20get%20that%20accomplished%20since%20the%20admin%20center%20won't%20let%20us%20change%20anything%20directly.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2544056%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ESync%20Issue%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2545901%22%20slang%3D%22en-US%22%3ERe%3A%20Odd%20user%20sync%20situation%2C%20not%20sure%20how%20to%20resolve.%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2545901%22%20slang%3D%22en-US%22%3EYou%20should%20be%20able%20to%20hard-match%20them%3A%20%3CA%20href%3D%22https%3A%2F%2Fdirteam.com%2Fsander%2F2020%2F03%2F27%2Fexplained-user-hard-matching-and-soft-matching-in-azure-ad-connect%2F%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fdirteam.com%2Fsander%2F2020%2F03%2F27%2Fexplained-user-hard-matching-and-soft-matching-in-azure-ad-connect%2F%3C%2FA%3E%3CBR%20%2F%3EAnd%20if%20you%20want%20to%20delete%20the%20user%2C%20use%20PowerShell%20(Remove-MsolUser)%3C%2FLINGO-BODY%3E
New Contributor

I'm sure similar situation have come up, but I haven't come across anything that quite fits this situation. It would be best if I just lay out what led up to this mess:

 

New employee was hired. His user was setup in AD, synced to O365, email setup, everything's fine.

Literally that night the domain controller crashed and had to be restored from backup.

Newly created user was lost in local AD.

Someone recreated his local AD user (presumably incorrectly, or at least without consideration of what would happen on O365 end).

New local AD user synced, creating a second O365 user that has all of his permissions, but incorrect UPN and no email or licensing.

Original orphaned O365 user does not have permissions, but has correct UPN and the user's email and license.

 

Both users show as synced with on-premises AD and cannot be modified or deleted in the admin center as a result. How do we merge the two O365 users into one that is actually linked to the existing local AD user?

 

If it would be easier to download his email (there likely isn't much, if any), complete wipe his O365 user(s), and resync him to a whole new user, that would also be acceptable, just not sure how to get that accomplished since the admin center won't let us change anything directly.

2 Replies
You should be able to hard-match them: https://dirteam.com/sander/2020/03/27/explained-user-hard-matching-and-soft-matching-in-azure-ad-con...
And if you want to delete the user, use PowerShell (Remove-MsolUser)
Thank you for the response. I've seen references to these functions in other posts, however, I was looking for a bit more of a guided response. O365 is new for us and this isn't really explaining how to do it so much as it's just saying this is what you use.