Prompt
Why does SCIM provisioning create duplicate users?
Latest observation
SCIM provisioning usually creates duplicate users when the IdP and the app don’t match an existing account exactly the way the SCIM server expects. The most common causes are:
1) Matching is based on the wrong identifier
SCIM providers typically use one or more of these to decide whether to update an existing user or create a new one:
userName- an external ID / immutable identifier
- sometimes
idreturned by the app
If the IdP sends a different value than what the app already has, the app may not recognize the user and creates another one.
2) Email vs username mismatch
A very common issue is:
- the app has
alice@company.com - the IdP sends
alice - or the IdP sends a different case/format like
Alice@company.com
If the app treats those as different, you get duplicates.
3) Case sensitivity / formatting differences
Some systems consider these different:
alice@company.comvsAlice@company.comalice@company.com(trailing space)alice+sales@company.comvsalice@company.com
4) The SCIM integration isn’t using a stable unique key
If the IdP doesn’t send a persistent identifier, re-provisioning can look like a brand-new user each time.
Best practice is to use a stable, immutable identifier such as:
- an external ID from the IdP
- a unique employee ID
- a directory object ID
5) The user already exists manually
If someone created the user in the app before SCIM was enabled, and SCIM doesn’t map to that existing account, it may create a second account instead of linking to the first.
6) Multiple source systems are provisioning the same app
If you have:
- HR system provisioning
- plus Okta / Entra / OneLogin SCIM
- plus manual admin creation
…they can each create their own record for the same person.
7) Deprovisioning/reprovisioning behavior
Sometimes a user is disabled or deleted in the app, then later re-added by SCIM as a new account because the old one is no longer matchable.
8) App-side SCIM implementation issues
Some apps have buggy or incomplete SCIM implementations, such as:
- not honoring
externalId - not supporting proper
/Users?filter=...lookups - always creating on
POST /Users - failing to update existing records correctly
How to prevent duplicates
- Use a single source of truth for provisioning
- Map SCIM to a stable unique identifier
- Make sure
userNameand email are normalized consistently - Avoid manual user creation for provisioned accounts
- Check whether the app supports matching on
externalId - Review SCIM logs to see what identifier is being used for matching
If you want, I can also help you troubleshoot a specific SCIM setup (for example Okta, Entra ID, or a particular app).