JetBrains / teamcity-azure-active-directory

TeamCity plugin which supports authentication via Microsoft Azure Active Directory
Apache License 2.0
26 stars 19 forks source link

LDAP synchronized user is deleted after signing in with Azure AD #57

Open LapNik opened 3 years ago

LapNik commented 3 years ago

When I use both the Azure AD and default login page authentication methods, my LDAP synchronized user gets deleted. I assume that this is because logging in with Azure AD changes the username from "firstname.lastname" to "fistname.lastname@company.com". The property teamcity.options.deleteUsers is enabled in my setup, so when the LDAP users are synchronized the latter username is not found and the user is deleted.

Preconditions:

Steps to reproduce:

  1. Log in with Azure AD.
  2. Log out.
  3. Log in with teamcity login page.

EXPECTED RESULTS:
Both login methods log in the same user.

ACTUAL RESULTS:
The original synchronized teamcity user is removed. New user is created if LDAP setting about creating new user on first login is enabled.