LADP login no longer working due to lower case email vs. upper case/lower case AD email

We are running Metabase on version v0.37.0.2, built on 2020-10-26.

Presumably since the update our LDAP logins are no longer working and we are getting an error for all existing accounts.

Error: Duplicate key value violates unique constraint “core_user_email_key”. Detail: Key (email)=( already exists.

First, I checked with our IT dept: There was no change in the AD email settings for years. The email settings in the AD are and have been for years Uppercase first letters on first name and last name.

We were able to reproduce the error:

When setting up a new account, a new user is created in public.core_user with the new email -> everything in lower case.

When this user is trying to relogin, the error mentioned above is appearing.

When updating the login credentials to in public.core_user the login process works again.
(update public.core_user set email = ‘’ where id = …)

Any idea for a quick fix?

Hi @andreas
You’re seeing the same as the folks here:
LDAP Authentication issue
Case-sensitivity of logins was removed in 0.37:
Please open a bug:

For reference: - upvote by clicking :+1: on the first post