I was recently prompted about a Directory Sync error witting Microsoft 365 Admin Center. The user account had the message “We detected a duplicate UserPrincipalName conflict on the value [email protected]. All attribute values need to be unique across objects. To resolve this conflict, first determine which object should be using the conflicting value. Then, update or remove the conflicting value from the other object(s).” A little research revealed the account had been created, deleted, and then recreated in a short period of time. I suspect directory synchronization may have occurred at some point between the creation and deletion resulting in the error.
The solution wasn’t straight forward. Some resources indicated recreating the user would resolve the issue but this wasn’t an option. I ended up modifying the UserPrincipalName, performing an Azure Active Directory Sync, changing the UserPrincialName back to it’s original value, and then performing another sync to resolve the Sync conflict.
- Launch the Active Directory Users and Computers snap-in.
- Select your domain and then click View → Advanced Features.
- Locate the User Object and open the Properties Dialog.
- Select the Attribute Editor tab and locate the UserPrincipalName. Modify the UserPrincipalName to something else temporarily. For example, add an “X” to the end of the username. Click OK and Apply.
- Allow Azure Active Directory to synchronize. This can be manually initiated from your DirSync (Azure AD server) by running the following PowerShell Command.
Start-ADSyncSyncCycle -PolicyType Delta
- Check your Microsoft 365 Admin Center – the conflict message should now be gone.
- Return to the User’s Properties dialog and change the UserPrincipalName attribute back to it’s correct value.
- Allow Azure Active Directory to synchronize.
- Check the Microsoft 365 Admin Center – the conflict message should not reappear.
So i have tried this and it does take the sync error away but when i change it back the sync issue comes back again
Thank you! After trying various complicated but frustrating solutions, none of it worked till I read your article. So simple!
No problem. Thanks for stopping by. 🙂