I am trying to connect my Azure DevOps environment to Azure Active Directory. I get the following error:

Tenant switch failed, on a precondition, with the following message: 1 of 10 total users has multiple active identities with the same UPN. Please either remove the duplicates or change the UPNs to be unique.

There are only 9 users in Azure DevOps. The only thing I can think of is that a user is removed from the organisation and later readded, but I can't find any duplicates in the Users in DevOps. Also, in the target AAD there are no duplicates (I can't imagine you can have duplicate UPN anyway).

I can't really find anything that can help met troubleshoot this issue. Anyone has any ideas to fix this?

1 Answer 1


Maybe you created a cloud account with the same UPN before sync'ing the on premise with azure ad connect? or something else of that nature.

Navigate to graph explorer https://developer.microsoft.com/en-us/graph/graph-explorer log in with a azure ad admin account and type in a query like this


There should only be entry, but if there are multiple, then that's where the problem is.

  • Interesting, will test that.
    – RS Finance
    Sep 1, 2023 at 11:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.