Azure AD Connect error- Unique Value

Robert Greenhoe 1 Reputation point
2022-01-31T16:03:17.583+00:00

I have had AD connect running for some time and just added more OUs to it and one user is getting an error as seen below. Anybody have an idea what it could be?

169889-image.png

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

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 37,266 Reputation points Microsoft Employee Moderator
    2022-01-31T21:47:58.533+00:00

    Hi @Robert Greenhoe ,

    I understand that you are seeing the "AttributeValueMustBeUnique" error after adding more OUs. You are also receiving the error:

    Unable to update this object because the null value null associated with this object may already be associated with another object in your local directory services. 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).

    If there are accounts that are not matching, you may need to do a hard match via Powershell to fix the issue. To do this, you can follow these steps:

    1) Get Object ID of the cloud user to be matched on the Azure portal (get-aduser -Identity “first name last name”). Then convert the Object GUID to a B64 value via Powershell:

    $guid = "744e2196-2ce9-4b4f-cb7f80da839f"   
    $base64 = [system.convert]::ToBase64String(([GUID]$guid).ToByteArray())   
    $base64copy  
    

    2) Save the value and Connect Powershell to Microsoft 365:

    3) Then log in by entering your Microsoft 365 admin account information and assignthe relevant Microsoft 365 user (UserPrincipalName) the previously saved B64 riff as ImmutableId:

    Set-MsolUser -UserPrincipalName ******@mmhos.org -ImmutableId yourb64immutableid  
    

    4) If you receive an error message, check if there is any deleted user in the way and remove it if it is conflicting:

    Get-MsolUser -ReturnDeletedUserscopy  
    
    Remove-MsolUser -UserPrincipalName  ******@yourdomain.org  -RemoveFromRecycleBin  
    

    5) Run a delta sync and check whether the match is success or not.

    Additional reading:
    Error Type: AttributeValueMustBeUnique
    Duplicate or invalid attributes prevent directory synchronization in Office 365
    Hard Match Users


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.