Failed to add user error due to email or username already existing with a different case

You should ensure casing for usernames is consistent across all accounts and providers in your system.

Written by harrison.schueler

Last published at: January 20th, 2023

Problem

You are trying to add a new user to your Databricks workspace via the Admin Console, but it fails with an error saying that the email or username already exists with a different case.

Failed to add user: A user with email <email-address> and username <username> in difference cases already exists in the account.

You may also get this error when a newly added user tries to log into the workspace via SSO.

Cause

This happens when you try to use a username that is identical to an existing name with the exception of case (lowercase or uppercase).

  • The user already exists in the account with different case formatting. For example, you are trying to add the username <firstname.lastname>, but the user <Firstname.Lastname> already exists in your account.
  • The email format used by your Single Sign-On (SSO) provider uses different casing than an existing account in your workspace. For example, the username was added to the account in lowercase <firstname.lastname>, but the email used by the SSO provider is in uppercase <Firstname.Lastname@yourcompany.com>.

Solution

Ensure that casing for usernames is consistent across all accounts and providers in your system.

For example, if you use the lowercase convention for your Databricks workspace, make sure that you also use the lowercase convention for your SSO provider.