You want to resolve a duplicate username error that is preventing a user from logging into Salesforce using Single Sign-On (SSO). Salesforce usernames must be globally unique across all orgs, and SSO login relies on the Federation ID — not the username — to match users between your Identity Provider (IdP) and Salesforce. A mismatch or duplicate in either value will cause login to fail.
Follow the steps below to identify and resolve the duplicate username error. There are two common causes: a duplicate username in Salesforce, or a misconfigured Federation ID. Work through both sections if the issue persists after the first.
Go to Setup (click the gear icon in the top right, then select Setup).
In the Quick Find box, type Users and select Users under Administer.
Find the user experiencing the issue. Search by username or email address.
Check the Username field for the user.
If the username is duplicated, change it to a unique value. Salesforce usernames must be unique across all Salesforce organizations globally.
If the duplicate username is intentional (for example, the same person has accounts in multiple orgs), ensure your SSO configuration maps users by their unique Salesforce User ID or Federation ID — not by username alone.
In Setup, type Single Sign-On Settings in the Quick Find box and select it.
Review the Federation ID for the affected user. The Federation ID in Salesforce must exactly match the unique identifier your Identity Provider (IdP) sends during the SAML assertion.
Confirm that your Identity Provider is sending the correct and unique identifier for this user. Contact your IdP administrator if you are unsure which attribute is being sent.
If you update the Federation ID in Salesforce, ask the user to attempt login again.
If the issue persists, review the SSO login history for more detail on the error. In Setup, type Login History in the Quick Find box and select it. Filter by the affected user to identify the specific failure reason.
005389421

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.