SCIM User resource: map identifiers and manage user status safely
Understand who owns each SCIM User attribute, how to provision and verify records, and why deactivation is not automatically session revocation.
The SCIM User resource is a standard JSON representation for user data exchanged between provisioning clients and service providers. The service provider issues id; the client may set externalId; and required userName is a service-local identifier, not necessarily an email address. Before creating, updating, or deactivating accounts, discover the target service’s supported schema and synchronization behavior.
Key attributes and ownership
| Attribute | Owner and meaning |
|---|---|
id | Issued by the SCIM service provider; stable, unique across its resources, not reassigned, and read-only to clients. Use it for later resource requests. |
externalId | Optional identifier assigned by the provisioning client, scoped to its provisioning domain. The client controls uniqueness. |
userName | Required, non-empty identifier within the service. The provider enforces uniqueness; comparison is case-insensitive. It need not be an email. |
name, displayName | Common display information; map from the source and check target support. They are not the required identifier. |
emails, phoneNumbers | Multivalued attributes governed by mapping agreements and target write rules. Send only what is needed. |
active | Optional Boolean administrative status. Verify product behavior before assuming it blocks login or revokes sessions. |
groups | Relationship information managed or calculated by the provider; do not confuse it with app authorization policy. |
meta | Provider-managed, read-only resource metadata such as creation time, version, and location. Client-supplied values are ignored. |
A User may include extension schemas identified by URI. For example, enterprise extensions can represent department or manager data. Confirm support in /Schemas, /ResourceTypes, and the service documentation before sending extension attributes.
Map identifiers safely
Use the server-issued id as the stable key for reading and changing a resource. Treat externalId as a client-owned value within its provisioning domain; when multiple domains feed one service, distinguish and protect each domain’s values.
userName must be unique within the service, but RFC 7643 does not require email syntax. If a deployment uses email as userName, keep the source identity separate so an email change does not silently become an account change. Do not automatically merge users based only on matching email text.
Example User
This is a fictional example. Server-issued id, meta, and service-specific required values depend on the target contract.
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"externalId": "hr-employee-1042",
"userName": "alex.park@example.test",
"name": {"givenName": "Alex", "familyName": "Park"},
"displayName": "Alex Park",
"active": true
}The client does not assign id in a create request. Store the ID returned by the server and use it for later reads or updates. A full server response may include server-managed id and meta.
Provision and verify
**Discover capabilities.** Check `/ServiceProviderConfig`, `/Schemas`, and `/ResourceTypes` for the User schema, required attributes, supported PATCH/filter features, and endpoints.
**Map source fields.** Document the source identifier used as `externalId`, the value mapped to `userName`, and the meaning of names, email, and groups.
**Check for duplicates.** Query by `userName` or an allowed `externalId` using supported filters. If multiple results appear, do not automatically create another account.
**Create or update.** Use `POST /Users`, `GET /Users/{id}`, `PUT`, or supported `PATCH`. Confirm attribute ownership and omission behavior first. PUT replaces resource attributes, so omitted fields may be removed.
**Separate deactivation from deletion.** Before sending `active:false`, verify its effect under the service contract, including authentication and session/token revocation. SCIM DELETE and physical personal-data erasure may be different policies.
**Re-read the resource.** A successful HTTP response is not enough. Fetch it again and check `userName`, `active`, required attributes, and version.
SCIM defines POST, GET, PUT, PATCH, and DELETE semantics, but services do not all support the same optional capabilities. Use the target’s discovered behavior, especially for PATCH and filters.
Errors and data protection
**`userName` conflict:** check service uniqueness rules, case normalization, and source mapping.
**Cannot find by `externalId`:** verify the provisioning domain, filter support, and exact stored string.
**Login still works after `active:false`:** separately verify authentication, session, and token behavior; the field alone does not prove every session ended.
**Extension attributes disappear:** confirm the extension URI is in `schemas` and supported by the service.
**Logs expose personal data:** log non-sensitive error codes and resource IDs instead of full requests or responses; control access and retention for logs and backups.
Usernames, email, phone numbers, and employee numbers can all be personal data. Send only fields needed for the purpose and restrict recipient domain, retention, and provisioning-token permissions.
References
[RFC 7643 — SCIM Core Schema, §§3.1, 4.1, 4.3](https://www.rfc-editor.org/rfc/rfc7643.html)
[RFC 7644 — SCIM Protocol, §§3–4, 7](https://www.rfc-editor.org/rfc/rfc7644.html)