We detected a duplicate UserPrincipalName conflict on the value 1. All attribute values need to be unique across objects.

After I created some accounts in my on-premises Active Directory, I suddenly found this DirSync error in my Azure portal

We detected a duplicate UserPrincipalName conflict on the value x. 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).

Azure ADConnect Dirsync We detected a duplicate UserPrincipalName conflict on the value

My Azure ADConnect / DirSync tool was syncing fine. And actually, the account names were very trivial and random. So acutally I could’t believe I created a  duplicate UPN.

First step to tackle this issue, was powershelling to MSOL and searching for accounts with a similar name string.

Connect-MsolService
Get-MsolUser -SearchString donald.tru*

This returned only one result. So that should be fine. Now, let’s search for similar UPN’s in my on-premises Active Directory:

  1. Open Active Directory Users and Computers
  2. Open the Search Windows
  3. Go to find: Custom Search, and then tab Advanced
  4. Type the following LDAP query:
    userprincipalname=*name of upn*
  5. Click Find Now to get all search results

search active directory for userprincipalname UPN

At this point I didn’t have a clue what went wrong with the DirSync.

Fix for We detected a duplicate UserPrincipalName conflict on the value

I ended up

  1. renaming the UPN on-prem (just added a X at the end). I used the Attribute Editor for this action. But ADSI Edit is fine too.
  2. forcing a DirSync (I used Start-ADSyncSyncCycle cmdlet, but you can also use the Synchronization Service Manager tool
  3. changing the UPN back to its original value

Guess what?! Problem solved. 😀

Thanks to HappyMillfam for the first troubleshooting steps.

 

0 0 votes
Article Rating
Subscribe
Notify of
guest
1 Comment
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
BBDY

Wow, this helped a lot and it worked

1
0
Would love your thoughts, please comment.x
()
x