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)=(firstname.lastname@domain.com) 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 Firstname.Lastname@domain.com. 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 firstname.lastname@domain.com. -> everything in lower case.

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

When updating the login credentials to Firstname.Lastname@domain.com in public.core_user the login process works again.
(update public.core_user set email = ‘Firstname.Lastname@domain.com’ 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:
https://github.com/metabase/metabase/issues/3047
Please open a bug:
https://github.com/metabase/metabase/issues/new/choose

For reference:
https://github.com/metabase/metabase/issues/13739 - upvote by clicking :+1: on the first post