Your username must be unique across all Salesforce orgs, including Trial, Production, and Sandbox orgs. The email used for the username need not function or match the email address used for the account. You can have the same email address associated with your account across multiple orgs. For example, create unique usernames like jane@company.sandbox and jane@trialorg.company.com, for different accounts that are associated with the same email address.
Keep in mind that Salesforce Customer Support can’t change usernames or deactivate users from an org. If you get a Duplicate Username error, check if the username is already in use in your production, trial, or Sandbox orgs. Deactivate or change the username for the user record, then create your account with your desired username in your production org. If you’re unable to change or deactivate a username, contact your Salesforce admin for help. If you’re unable to locate the org where the username is already in use, try a different username to create your account.
Note:
To change the username the 'Manage Users' permission is required. Please contact your System Administrator for help if lacking this permission.
Note:
If you encounter the duplicate user name using Lightning Essentials, the Admin will need to switch to Classic in order to create the User as the Lightning interface in Essentials will not allow access to this field.
TIP : Locate Your Username Across Orgs Using the Environment Switcher
Quick workaround with the feature Access Multiple Salesforce User Accounts (Reference article) can be used to manage your orgs. You can choose to log in via email. (Only within the Organizations)
If you know the email the user might have used, they can log into the "Salesforce Environment Switcher" and potentially find all the orgs where this email is being used.
Which could give you a hint on where the specific username is being used and contact the right person directly.
Verify Your Email Address and Log In :
1. Log in to one of the user accounts associated with your email address.
2. Open the Log In with Email page.
3. Enter your email address, and then click Log In.
4. The Verify Your Identity page opens, and a verification code is sent in an email to the address that you entered.
5. Copy the verification code from the email, and enter it in the fields on the Verify Your Identity page.
6. After your account is verified, the Environment Switcher opens with a tile for each of the Salesforce properties that you can access.
Considerations for Editing Users
Usernames and Passwords
Guidelines for Adding Users
Add a Single User
Error 'Duplicate Username' after Sandbox refresh
Prevent duplicate email addresses from being created
Trailblazer Community - How to get all users using Apex Code
000385306

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.