Hey team, We started getting a strange behavior in...
# ask-a-descoper
y
Hey team, We started getting a strange behavior in one of our tenant - users are being duplicated and people in that org gets 2 records in descope for some reason. This also creates problems with defaults roles and is causing us trouble, anyone available for a quick consultation about this issue?
m
Which authentication methods are you using? Are the duplicated users identical or they have slightly different information?
y
slightly different emails (lower vs upper case), only SAML with this tenant
one of the user's login-id is only a guid, the other is the email+guid which is the typical format for SSO users
@Michael Rimboim any update? 🙂
r
Hey Yair, This is an expected behavior when the optimal terms for SSO merging is not set. To make sure we merge the identities you need to make sure: 1. The user is part of the same single tenant that the SSO is configured on. Not more, not less. 2. The convert to SSO only flag is enabled in the project’s SSO authentication method setting 3. The user’s SAML response contains the NameID to be the same LoginID that already exists for the user in the user’s table. Specifically here, i think that the user’s NameID is returned as email, so you have a missmatch in expectation in the tenant. Pls see this article to debug the SAML response https://docs.descope.com/other-troubleshooting/sso-troubleshooting I would advise to contact the customer to have them change the NameID in their IdP after you confirm and identify the issue.
y
@Reuven Zabirov @Michael Rimboim Should the descope loginID be generated based on the "name" field of the generated user by the SAML response? I see from the audit logs that for the 2 instances of the same user I once got his email in the name field and a random UUID in the second one. This correlates with the 2 different login IDs and explains why I got 2 users, but I thought that the login ID should be based on the email field (which is the same for both SAML responses) Would love to get your explanation for this behavior please
r
We take the NameID and generate an SSO type loginId (which looks like <NameID>-<tenantId>) So for an example If you have an already existing user: reuven@descope.com And the NameID is the same value We convert it to reuven@descope.com-tenantid for an example a previous user with reuven@descope.com And the NameID is U123456 (the user id for an example from the IdP) We don’t merge them and you are left with the previous email as loginId user And we create U123456-tenantId This goes vice verca if you have UserId as loginId and the Idp sends the email as the NameID
y
Ok so it sounds like what I experience exactly. 1. Any idea in what scenario we can receive 2 different NameIDs from the IDP? Does it require the tenant to change something on their end? 2. Just out of curiosity- Why don't you use the email? It will deduplicate these types of cases
r
Your customer could have changed that in the IdP so you could see differences, it’s not a dynamic field or something, rather a configuration Email is not a unique field and you can have users who use the same email or change it. by the SAML 2.0 standard IdPs should use NameID
My recommendation is that in this specific tenant you should align the expectations with your customer to have the NameID set as you need it to