Prompt
How do I troubleshoot duplicate customer accounts after SSO sign-in?
Latest observation
Duplicate customer accounts after SSO sign-in usually mean the identity provider is not matching the user to the existing customer record, so the platform creates a new one. Here’s a practical troubleshooting checklist.
1) Confirm which identifier is being used to link the account
Most systems link SSO users by one of these:
- Email address
- NameID / Subject (
sub) - A custom claim like
customer_id,external_id, oruid
Check:
- Is the identifier stable across logins?
- Does it match the value already stored on the customer account?
- Is the system configured to match on email but the SSO assertion sends a different email or a different case/format?
2) Compare the SSO claim values to the existing customer profile
Inspect the actual SSO assertion/token and compare it to the existing account:
- Email spelling
- Upper/lowercase differences
- Leading/trailing spaces
- Alternate email aliases
- Missing domain changes
- Different NameID format
Even small differences can cause a new account to be created.
3) Check for duplicate records in the identity store
Look for:
- Multiple customer records with the same email
- Records created before SSO was enabled
- Records created by social login, password login, or manual import
If the user already has an account, the SSO flow may be treating them as a new person because the IDs don’t match exactly.
4) Verify SSO configuration
Review settings such as:
- Just-In-Time provisioning enabled/disabled
- Account linking enabled/disabled
- Auto-create users behavior
- Whether login should fail when no match is found, instead of creating a new account
If auto-provisioning is on, the system may create duplicates whenever the incoming identity doesn’t link cleanly.
5) Check whether the IdP is sending a consistent unique identifier
For SAML/OIDC:
- Prefer a persistent unique ID over email if your platform supports it
- In OIDC,
subshould usually be the stable unique identifier - In SAML, use a consistent NameID or custom attribute
If the IdP changes the identifier when:
- users change names
- email addresses change
- different apps use different formats
then duplicates can appear.
6) Inspect account linking behavior
If the platform supports manual or automatic linking:
- Ensure the existing customer record is already linked to the correct SSO identity
- Confirm there isn’t a second linked identity for the same person
- Remove incorrect links carefully, then relink to the correct account
7) Check email verification rules
Some systems create a new account if:
- the incoming email is unverified
- the email domain differs
- the account is pending verification
Make sure the IdP is asserting a verified email if your platform requires it.
8) Review logs for the exact creation reason
Look for events like:
- “No matching user found”
- “Provisioned new user”
- “Email mismatch”
- “Duplicate identity conflict”
- “Account created via SSO”
These logs usually show exactly why a new account was created.
9) Test with one known account
Use a single test user and walk through:
- Existing customer record lookup
- SSO login
- Returned claims
- Account matching result
- Provisioning decision
This helps isolate whether the issue is in:
- the IdP claim mapping
- the platform matching logic
- the user’s existing data
10) Fix the root cause
Common fixes include:
- Standardize on one unique identifier
- Normalize email addresses before matching
- Merge duplicate accounts
- Disable auto-create for unmatched SSO users
- Pre-link existing accounts to SSO identities
- Update IdP claim mappings
Quick resolution strategy
If you need the fastest path:
- Identify the existing customer record.
- Compare the SSO assertion against that record.
- Determine what identifier is used for matching.
- Correct the mapping or manually link the account.
- Merge any duplicates and prevent future auto-creation.
If you want, I can also give you:
- a step-by-step SAML troubleshooting flow
- an OIDC-specific checklist
- or a support ticket template to help gather the right logs and claim data.