Bug: Microsoft Entra ID (OIDC)
creates a new user when one has already been created by another connector
#7029
Labels
bug
Something isn't working
Describe the bug
The Microsoft Entra ID (OIDC) SSO Connector creates a new user when one has already been created by another connector.
Expected behavior
Link the already registered user when it exists
How to reproduce?
Start Logto, configure Microsoft Entra ID (OIDC) with the
Trust unverified email
option either enabled or disabled, and another connector, in my case, Google Workspace. Sign in the first time with the other connector, and the second time, sign in with Microsoft Entra ID (OIDC) using the sameemail
for both connectors. Then, check in User Management how many users were created.Context
v1.24.0
Additional information
Trying to understand what happened, I discovered that when
AzureOidcSsoConnector
callsgetUserInfo
, thegetIdTokenClaims
andgetUserInfo
functions fromOidcConnector/utils
didn’t return theemail
field. However, in the ID token payload, there was a field calledpreferred_username
containing my user's email.The text was updated successfully, but these errors were encountered: