Skip to main content

SCIM 2.0 Provisioning

Idenplane implements the SCIM 2.0 protocol (RFC 7643, RFC 7644) so an external identity provider — Microsoft Entra ID (Azure AD), Okta, OneLogin, or anything else that speaks SCIM — can create, update, and deprovision users and groups, and set their passwords, instead of you syncing them by hand. To connect one, see Configuring Your Identity Provider.


Concepts​

Base URL and Endpoints​

The SCIM base path for a realm is:

/scim/v2/{realmName}

where {realmName} is the realm's name (not its UUID). The implemented resource endpoints, all under that base path:

MethodPathPurpose
GET / POST/UsersList (with filter/pagination) / create
GET / PUT / PATCH / DELETE/Users/{id}Get / full replace / partial update / deprovision
POST/Users/.searchSearch via POST body instead of query string
GET / POST/GroupsList (with filter/pagination) / create
GET / PUT / PATCH / DELETE/Groups/{id}Get / full replace / partial update / delete
POST/Groups/.searchSearch via POST body
POST/BulkBatch of the operations above in one request

The discovery endpoints need no authentication and are served both at /scim/v2 and under each realm's base URL, where SCIM clients look for them: GET /ServiceProviderConfig, GET /Schemas (and /Schemas/{id}), and GET /ResourceTypes (and /ResourceTypes/{name}). /Schemas and /ResourceTypes answer with a ListResponse, as RFC 7644 §4 requires; see Discovery below for what they claim.

Requests may be sent as application/scim+json (what Entra ID, Okta and OneLogin send, per RFC 7644 §3.1) or application/json. Responses are application/scim+json.

Authentication​

Every /Users, /Groups, and /Bulk call requires Authorization: Bearer <token>. The token is opaque — generated by Idenplane, not a JWT — and validated by hashing the presented value with SHA-256 and comparing it against the stored hash; the plaintext is never stored and is shown to you exactly once, at creation time.

If the realm's SCIM provisioning is turned off, or the bearer token is missing, unknown, revoked, expired, disabled, or issued for a different realm, every one of those endpoints returns 401 Unauthorized (not 403 — despite what the admin console's toggle description says).

Tokens carry scopes (defaulting to ["urn:scim:schemas:core:1.0:Users", "urn:scim:schemas:core:1.0:Groups"] if you don't specify any) and an optional expiresAt. As of today, scopes are stored and returned but not read anywhere in the authorization check — they're a label for your own bookkeeping, not an access-control boundary. Every valid token can call every SCIM endpoint in its realm regardless of its scopes value.

Schema URNs and Errors​

Resources and messages use the RFC 7643/7644 2.0 URNs: urn:ietf:params:scim:schemas:core:2.0:User and :Group, the enterprise extension urn:ietf:params:scim:schemas:extension:enterprise:2.0:User, and urn:ietf:params:scim:api:messages:2.0:ListResponse, :Error, :PatchOp, :BulkRequest and :BulkResponse. A user that has enterprise attributes lists the extension URN in its schemas. meta carries resourceType, created, lastModified and location: the resource's absolute URL under the realm's base URL (built from BASE_URL); a create also returns it in the Location header. meta.version and ETags are not provided (etag.supported is false).

Errors use the RFC 7644 §3.12 body, with status as a string:

{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
"status": "409",
"scimType": "uniqueness",
"detail": "User 'jsmith' already exists"
}

scimType is set where RFC 7644 defines one: uniqueness (409: userName, email or group name taken), invalidFilter, invalidPath, noTarget, invalidValue (including a password the realm's policy refuses), invalidSyntax, mutability (400), tooMany (413, Bulk) and invalidValue with 409 for a Bulk bulkId reference that cannot be resolved.

Discovery​

GET /ServiceProviderConfig claims only what works:

FeatureSupportedNotes
patchyes
bulkyesmaxOperations 1000, maxPayloadSize 1048576 (1 MiB, the SCIM body limit)
filteryesmaxResults 100
changePasswordyesSee Passwords below
sortnosortBy is ignored; lists are ordered by userName / displayName
etagno

The only authentication scheme is oauthbearertoken. /Schemas lists the attributes that are stored and returned, with their RFC 7643 characteristics (password is writeOnly and returned: never). ims, photos, entitlements, roles and x509Certificates are not stored and not listed; a client that sends them anyway is not refused, the values are dropped.

User and Group Field Mapping​

SCIM attributeIdenplane fieldNotes
userNameusernameRequired; unique in the realm, compared case-insensitively
name.givenName, name.familyNamefirstName, lastName
emails (primary, or first if none marked primary)emailOne email is stored: unique in the realm, compared case-insensitively. Returned as one email with type: "work" and primary: true.
activeenabled"True"/"False" strings (as Entra ID sends) are read as booleans. A PUT without active keeps the current value.
passwordpasswordHashWrite-only. See Passwords.
externalIdits own columnStored, returned and filterable; compared case-sensitively (RFC 7643 caseExact). Never written to federationLink.
displayName, nickName, profileUrl, title, userType, preferredLanguage, locale, timezone, name.formatted, name.middleName, name.honorificPrefix, name.honorificSuffix, phoneNumbers, addressesthe user's SCIM profileStored as SCIM sent them and returned. displayName and name.formatted, when never set, are built from "firstName lastName". Up to 20 phone numbers or addresses, 2048 characters per value. phoneNumbers is never the user's SMS MFA number.
Enterprise extension: employeeNumber, costCenter, organization, division, department, managerthe user's SCIM profilemanager is returned as {"value": "<id>"}; Entra ID's bare-string form is accepted too.
groupsRead-only, derived from group membershipEach with value, display, $ref and type: "direct". Refused in a PATCH (400 mutability), ignored in a POST or PUT body.

The SCIM profile is SCIM's own copy: the admin console and the rest of Idenplane don't read it.

SCIM attributeIdenplane fieldNotes
displayNamename (and description)Required; unique in the realm, compared case-insensitively
membersGroup membershipvalue is the Idenplane user ID; ids that are not users of the realm are skipped. Only users can be members.
externalIdits own columnStored, returned and filterable (case-sensitive)

Create and Replace​

POST /Users and PUT /Users/{id} read the same attributes as PATCH. A PUT replaces the user (RFC 7644 §3.5.1): a stored attribute the body leaves out is cleared, except active (kept, so a PUT without it never disables the user) and password (kept unless sent). id, meta, groups and attributes outside the schema are ignored in these bodies. PUT /Groups/{id} replaces the group, members included: a body without members leaves the group empty.

Passwords​

password can be set when the user is created, by PUT, or by PATCH in any of the forms clients send:

{ "op": "replace", "path": "password", "value": "N3w-passphrase" }
{ "op": "replace", "value": { "password": "N3w-passphrase" } }

A new password is checked against the realm's password policy (minimum length, character classes) and, for an existing user, its history (passwordHistoryCount): a password that fails either is refused with 400 invalidValue naming the rule, and nothing in the request is applied. It is hashed with Argon2id like every other password and never returned, in any response or audit event. Setting it is a credential reset, as when an admin sets it: the user is signed out everywhere (every session ends and its refresh tokens are revoked, offline ones included), brute-force failures are cleared, and the password joins the history.

Sending the user's current password is not a change: Okta, with password sync on, sends the password on every update, and that neither fails the history check nor signs the user out. remove on password is refused (400 invalidValue). Passwords longer than 1024 characters are refused.

Users federated from LDAP (users with a user-federation link, who sign in against the directory) keep their password in the directory. Storing a local one would silently switch them to local password sign-in, so SCIM never does:

  • a PATCH that sets their password is refused with 400 mutability ("managed by the user federation"), and nothing else in that request is applied;
  • in a PUT, the password is dropped and the rest of the user is applied. A PUT is the client's whole representation of the user, and Okta with Sync Password on includes the password in every profile update, so refusing it would fail every update of every federated user. Turn Sync Password off for directories whose users come from LDAP.

A password equal to the one already stored is a no-op for every user, federated or not.

PATCH​

PATCH /Users/{id} and PATCH /Groups/{id} follow RFC 7644 §3.5.2. The request lists its operations in Operations (lowercase operations is also read, for older clients). Op names are case-insensitive, so Entra ID's Add, Replace and Remove work. A request is checked in full before anything is written: if one operation is refused, none is applied.

Supported user paths:

Pathadd / replaceremove
activeSets enabled (true/false or "True"/"False")400 invalidValue
userNameSets the username (409 if taken)400 invalidValue
passwordSets the password (see Passwords)400 invalidValue
externalId, displayName, title, and the other singular attributesSets itClears it
name.givenName, name.familyName, name.formatted, ...Sets the name partClears it
name (object value)Sets the sub-attributes givenClears every part
emails, emails.valueSets the email (primary, or first, of the list)Clears it
emails[type eq "work"].value, emails[primary eq true].value, emails[value eq "..."]Sets the stored emailClears it if the filter selects it
emails[type eq "home"] and other email kindsIgnored (only one email is stored)Ignored
phoneNumbers, addressesreplace sets the list; add adds values, replacing the one of the same typeClears the list
phoneNumbers[type eq "work"].value, addresses[type eq "work"].locality, ...Sets that sub-attribute, creating the work value if there is none (Entra ID's form)Clears the sub-attribute, or the whole value without .sub
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department, ...:manager, ...:manager.valueSets it (manager may be "<id>" or {"value": "<id>"})Clears it
ims, photos, entitlements, roles, x509CertificatesIgnoredIgnored
id, meta, groups400 mutability400 mutability
Anything else400 invalidPath400 invalidPath

An operation without a path takes an object value whose keys are paths: plain (active), dotted (name.givenName), URN-prefixed (urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department) or nested ({"name": {"givenName": "Ada"}}, {"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {"department": "R&D"}}). A remove without a path is a 400 noTarget. Paths may carry the core schema prefix (urn:ietf:params:scim:schemas:core:2.0:User:name.givenName). A user PATCH answers 200 with the user.

Group paths are displayName (replace), externalId and members:

OperationEffect
add, path members, value [{"value": "<userId>"}]Adds the users
replace, path members, value [...]Makes the members exactly these users
remove, path members[value eq "<userId>"] (Okta)Removes that user
remove, path members, value [{"value": "<userId>"}] (Entra ID)Removes those users
remove, path members, no valueRemoves every member

A group PATCH is written in one transaction and answers 204 No Content, so adding a batch of members to a large group does not send the whole member list back. Send attributes or excludedAttributes as query parameters to get 200 with the group instead (?excludedAttributes=members for the group without its members).

Deprovisioning and Sessions​

Deactivating a user through SCIM — PATCH with {"op": "Replace", "path": "active", "value": "False"} (Entra ID), {"op": "replace", "value": {"active": false}} (Okta), or PUT with "active": false — sets enabled: false and signs the user out everywhere: every session ends and its refresh tokens are revoked, as the admin API's "sign out all sessions" does. Their access tokens stop passing introspection and userinfo at once. Re-activating the user does not bring those tokens back; the user signs in again.

DELETE /Users/{id} does not hard-delete — it sets enabled: false and ends the user's sessions the same way (a soft deprovision, so the account and its audit history are kept and an admin can restore it). A later GET still returns the user, with active: false; this differs from RFC 7644 §3.6, which expects 404. A client that provisions the same userName again gets 409 from the create, finds the user with its userName eq lookup and re-activates it. To remove the account for good, delete it in the admin console or API. DELETE /Groups/{id} does hard-delete the group.

Filtering​

Filters use the RFC 7644 §3.4.2.2 format attribute operator value, for example userName eq "jsmith". Supported operators: eq, ne, co, sw, ew, gt, ge, lt, le, and pr (present). The value must be one JSON value: a double-quoted string, a number, true, false or null.

  • Comparisons can be joined with and and or (and binds tighter), up to 20 of them. Parentheses, not and value-path filters such as emails[type eq "work"].value eq "..." are not supported and are refused with 400 invalidFilter.
  • An invalid or unsupported filter is a 400 invalidFilter, never an empty list, so an IdP can't mistake a filter it got wrong for "no such user" and create a duplicate.
  • Attribute names are case-insensitive. String comparisons on userName, the name parts, emails and displayName are case-insensitive (RFC 7643 caseExact: false); on externalId they are case-sensitive.

Filterable attributes for Users: userName, externalId, name.givenName, name.familyName, emails / emails.value, active (eq/ne with true/false) and id. For Groups: displayName, externalId, id, and members / members.value (eq with a user id, or pr). This covers the lookups Okta and Entra ID make before every create (userName eq "<value>", or externalId eq "<value>" when that is the matching attribute), Entra ID's group lookup (displayName eq "<value>") and its membership check (id eq "<groupId>" and members eq "<userId>").

Pagination and Attribute Selection​

startIndex is 1-based (values below 1 are read as 1); count is capped at 100 per page server-side regardless of what you request (defaults: startIndex=1, count=100; count=0 returns only totalResults). Pages are ordered by userName (or displayName) and then id, so they never overlap. List and search responses are shaped as:

{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 42,
"startIndex": 1,
"itemsPerPage": 42,
"Resources": [ /* ScimUser or ScimGroup objects */ ]
}

attributes and excludedAttributes (comma-separated query parameters, or arrays in a .search body) work on every list, search and single-resource read, and on PUT and PATCH responses. Names are case-insensitive and may be dotted (name.givenName, emails.value) or URN-prefixed (urn:ietf:params:scim:schemas:extension:enterprise:2.0:User:department). id, schemas, meta and userName (Users) or displayName (Groups) are always returned. A group read with excludedAttributes=members doesn't read its members at all, so large groups cost no more than empty ones.

Bulk Operations​

POST /Bulk accepts { "schemas": [...], "Operations": [{ method, path, data, bulkId }] } (lowercase operations is also read). path is /Users or /Groups for POST, and /Users/{id} or /Groups/{id} for PUT, PATCH and DELETE; a PATCH operation's data is a PatchOp body. Each operation runs through the same code as the individual endpoints. The response is a BulkResponse whose Operations give each operation's method, bulkId, status, location and, on failure, the SCIM error as response. failOnErrors stops processing after that many errors. More than 1000 operations is a 413 tooMany; a body over 1 MiB is a 413.

bulkId references are resolved (RFC 7644 §3.7.2): a value "bulkId:<id>" anywhere in an operation's data, or as the id in its path (/Groups/bulkId:<id>), becomes the id of the resource the operation with that bulkId created. An operation that refers to one listed later in the request runs after it. A reference to an unknown bulkId, to an operation that failed, or a circular one fails that operation with 409 invalidValue.

Request Size​

SCIM request bodies may be up to 1 MiB (other endpoints keep 100 KB), enough for a PUT of a group with more than 10,000 members. A larger body is answered with 413.


Setting Up​

Admin Console​

SCIM, under the realm's Applications section:

  • SCIM Provisioning toggle (scimEnabled) — must be on, or every /Users//Groups//Bulk call returns 401
  • User Autocreate and Group Sync toggles (scimUserAutocreate, scimGroupSyncEnabled) — stored on the realm and shown on the status view, but not currently read by the user/group provisioning logic; user creation and group membership updates behave the same regardless of these two toggle values today
  • Tokens — create with a name, optional description, optional expiry date, and optional scopes (see the scopes caveat above); the plaintext token is shown once
  • Attribute Mappings — a resourceType/scimAttribute/idenplaneAttribute/direction table you can populate for your own reference

Admin API​

Token and status management lives under /admin/realms/{realm}/scim, protected by the admin API key (this is a different credential from the SCIM bearer token itself — use the admin API key to provision SCIM tokens, then hand the SCIM token to your IdP):

MethodPathPurpose
POST/admin/realms/{realm}/scim/tokensCreate a token — plaintext shown once
GET/admin/realms/{realm}/scim/tokensList tokens (no plaintext)
GET/admin/realms/{realm}/scim/tokens/{tokenId}Get one
PUT/admin/realms/{realm}/scim/tokens/{tokenId}/revokeRevoke
PUT/admin/realms/{realm}/scim/tokens/{tokenId}/enableEnable
PUT/admin/realms/{realm}/scim/tokens/{tokenId}/disableDisable
DELETE/admin/realms/{realm}/scim/tokens/{tokenId}Delete
GET/admin/realms/{realm}/scim/statusenabled, userAutocreate, groupSyncEnabled, activeTokens, totalUsers, totalGroups
GET / POST/admin/realms/{realm}/scim/attribute-mappingsList and add entries in the reference mapping table
DELETE/admin/realms/{realm}/scim/attribute-mappings/{mappingId}Remove an entry
curl -X POST http://localhost:3000/admin/realms/my-realm/scim/tokens \
-H "x-admin-api-key: $ADMIN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Okta SCIM",
"description": "Okta SCIM connector for my-realm"
}'

Response (the token field is shown once):

{
"id": "tok_...",
"name": "Okta SCIM",
"description": "Okta SCIM connector for my-realm",
"enabled": true,
"scopes": ["urn:scim:schemas:core:1.0:Users", "urn:scim:schemas:core:1.0:Groups"],
"createdAt": "2026-08-02T00:00:00.000Z",
"expiresAt": null,
"token": "9kQz...c2"
}

Calling SCIM Directly​

curl "http://localhost:3000/scim/v2/my-realm/Users?filter=userName%20eq%20%22jsmith%22" \
-H "Authorization: Bearer 9kQz...c2"
curl -X POST http://localhost:3000/scim/v2/my-realm/Users \
-H "Authorization: Bearer 9kQz...c2" \
-H "Content-Type: application/json" \
-d '{
"userName": "jsmith",
"name": { "givenName": "Jamie", "familyName": "Smith" },
"emails": [{ "value": "jsmith@example.com", "primary": true }]
}'

The new user is created enabled unless the request sends "active": false. Add "password": "..." to set a password (checked against the realm's policy). displayName, title, phoneNumbers, the enterprise extension and the other attributes in the mapping table are stored and returned.


Configuring Your Identity Provider​

Both walkthroughs need the same two values from Idenplane:

  • Base URL (Okta calls it SCIM connector base URL, Entra ID Tenant URL):

    https://<your-idenplane-host>/scim/v2/<realm-name>

    <your-idenplane-host> is the public URL Idenplane is served at (the BASE_URL it runs with, which also builds meta.location), and <realm-name> is the realm's name, not its UUID. No trailing slash, and nothing after the realm name: the client appends /Users, /Groups and /ServiceProviderConfig itself. For example https://id.example.com/scim/v2/acme.

  • Bearer token: a SCIM token of that realm. Turn on SCIM Provisioning for the realm (Applications → SCIM), then Tokens → Create Token (or POST /admin/realms/{realm}/scim/tokens, see Admin API above) and copy the token: it is shown once. The client sends it as Authorization: Bearer <token>. Create one token per client, so you can revoke one without the other.

Before you start, check both by hand; a 200 with a ListResponse means the base URL, the token and the realm's SCIM switch are all right, and a 401 that one of them is not:

curl -s "https://id.example.com/scim/v2/acme/Users?count=1" \
-H "Authorization: Bearer $SCIM_TOKEN"

Microsoft Entra ID​

  1. In the Microsoft Entra admin center, go to Identity → Applications → Enterprise applications → New application → Create your own application, name it (for example "Idenplane"), and choose Integrate any other application you don't find in the gallery (Non-gallery).
  2. In the new application, open Provisioning → Get started (or New configuration) and set Provisioning Mode to Automatic.
  3. Under Admin Credentials:
    • Tenant URL: https://<your-idenplane-host>/scim/v2/<realm-name>
    • Secret Token: the SCIM token
  4. Click Test Connection. Entra ID sends a GET /Users?filter=userName eq "<random id>" lookup with the token and expects 200 with no results. A 401 means SCIM is off for the realm or the token is wrong; anything else, check the base URL.
  5. Save, then open Mappings.
    • Provision Microsoft Entra ID Users: the default mapping works as it is. Every attribute it sends is stored and returned: userName, active, displayName, title, emails[type eq "work"].value, preferredLanguage, name.givenName, name.familyName, name.formatted, addresses[type eq "work"].*, phoneNumbers[type eq "work"|"mobile"|"fax"].value, externalId and the enterprise attributes, manager included. Keep userName as the matching attribute (matching precedence 1); externalId also works as a matching attribute, since it is stored. Entra ID does not provision passwords: users get one in Idenplane (an admin reset, a reset email) or sign in through federation.
    • Provision Microsoft Entra ID Groups: the default (displayName, members, externalId from objectId) works. Group membership is sent with PATCH in batches.
  6. Under Settings, set Scope to Sync only assigned users and groups, assign users and groups under Users and groups, and set Provisioning Status to On.
  7. Entra ID runs a cycle about every 40 minutes. Use Provision on demand to push one user or group at once, and Provisioning logs to see each request and Idenplane's answer.

What Idenplane receives from Entra ID: a lookup GET /Users?filter=userName eq "..." before each create; POST /Users with the enterprise extension; PATCH with Replace/Add/Remove, "value": "False" strings for active, path-less values with dotted keys, emails[type eq "work"].value-style paths and the manager as a bare id; PATCH ... active "False" when a user is unassigned or soft-deleted, and DELETE /Users/{id} when they are hard-deleted (see Deprovisioning and Sessions); GET /Groups?excludedAttributes=members&filter=displayName eq "...", POST /Groups, member PATCHes and DELETE /Groups/{id}. All of these are supported. Microsoft's aadOptscim062020 flag (appended to the Tenant URL to make Entra ID send standard booleans and PATCH forms) is not needed, and Idenplane works with it too.

Okta​

  1. In the Okta Admin Console, go to Applications → Browse App Catalog, find SCIM 2.0 Test App (Header Auth), and Add Integration (or create your own app integration and enable SCIM provisioning on it). Name it and finish the wizard.

  2. Open the app's Provisioning tab → Configure API Integration → Enable API integration, then:

    • Base URL (SCIM connector base URL): https://<your-idenplane-host>/scim/v2/<realm-name>
    • API Token: the SCIM token. Okta sends it as Authorization: Bearer <token>.

    For an app integration you created yourself, the same values go under Provisioning → Integration: SCIM connector base URL, Unique identifier field for users = userName, Authentication Mode = HTTP Header, Authorization = the token.

  3. Click Test API Credentials (or Test Connector Configuration). Okta calls GET /Users with the token (and, for custom integrations, may read GET /ServiceProviderConfig, which needs no token).

  4. Under Provisioning → To App, enable what you want:

    • Create Users: POST /Users after a userName eq lookup.
    • Update User Attributes: PUT /Users/{id} with the whole user (custom integrations may use PATCH). Attributes Okta leaves out of a PUT are cleared, as RFC 7644 replaces; active and the password are kept.
    • Deactivate Users: PATCH with {"op": "replace", "value": {"active": false}}; the user is disabled and signed out everywhere.
    • Sync Password: Okta sends the user's Okta password (or a random one) as password on create and on change. Idenplane checks it against the realm's password policy and history: if your realm's policy is stricter than Okta's, Okta's push fails with a 400 invalidValue in its task list, so keep the two policies compatible. Each real change signs the user out of Idenplane everywhere; Okta re-sending the current password does not. For users federated from LDAP, Idenplane ignores the password Okta sends in a PUT and refuses one sent in a PATCH (see Passwords).
  5. Under Push Groups, push the groups you want. Okta creates them with POST /Groups, renames them with a path-less PATCH, adds members with PATCH ... "op": "add", "path": "members" and removes them with PATCH ... "path": "members[value eq \"<id>\"]"; some versions replace the members with PUT /Groups/{id}. All are supported; group PATCH answers 204.

  6. Assign users and groups under Assignments.

OneLogin and other clients​

Any SCIM 2.0 client works with the same base URL and bearer token. For OneLogin's SCIM Provisioner with SAML (SCIM v2 Enterprise), set SCIM Base URL to the base URL above and SCIM Bearer Token to the token; its default SCIM JSON template (userName, name, emails, externalId, enterprise extension) maps as in the field mapping table.


Next Steps​

Custom Auth Flows Multi-step authentication with conditional branching

Webhooks Get notified when SCIM-provisioned users log in

Authentication Guide OAuth 2.0 and OIDC flows for the users SCIM provisions

API Reference Complete REST API documentation


idenplane.com · GitHub · Discord