Skip to content

Documentation

SCIM 2.0 User Provisioning API (RFC 7644) — Okta & Entra ID Sync

Automate user lifecycles with SCIM 2.0: provision users and groups from Okta, Microsoft Entra ID (Azure AD), per-tenant certificate rotation, and audit logs.

10/29/2026
3 min read Edit on GitHub

SveltyCMS provides a native implementation of the System for Cross-domain Identity Management (SCIM) 2.0 protocol (RFC 7644). This allows enterprise identity providers (IdPs) like Okta or Azure AD to automatically provision and manage users and groups within SveltyCMS.


⚡ Quick Reference

Feature HTTP Endpoint Method Permission Required
List Users /api/scim/v2/Users GET Admin session only
Get User /api/scim/v2/Users/{id} GET Admin session only
Create User /api/scim/v2/Users POST Admin session only
Update User /api/scim/v2/Users/{id} PATCH Admin session only
Delete User /api/scim/v2/Users/{id} DELETE Admin session only
Bulk Ops /api/scim/v2/Bulk POST Admin session only
Important

SCIM is admin-session only — there is no grantable SCIM permission. The scim namespace is absent from ENDPOINT_PERMISSIONS, and _checkEndpointPermission returns false for it immediately after the admin fast-path (src/routes/api/[...path]/+server.ts, namespace === "scim"), so a non-admin role receives 403 FORBIDDEN even when it holds a broad manage:user-style grant. Provision with an admin/super-admin session or a website token of type: "admin-api" (which resolves to the admin role) — an sck_* API key resolves to role: "guest" and is rejected.


1. The Goal

Automate the user lifecycle (Joiners, Movers, Leavers) by allowing the enterprise IdP to be the source of truth, reducing manual administrative overhead and ensuring security compliance.


2. The Solution

Endpoint Configuration

The SCIM API is located at /api/scim/v2/. Most IdPs will require a SCIM Base URL and an API Token (generated via Tokens API).

Supported Attributes

SveltyCMS filters and maps SCIM standard attributes to its internal user model:

  • userName → username
  • emails[type=work] → email
  • active → status
  • displayName → metadata.fullName

3. The Mechanics

SCIM Compliance

The scim.ts handler implements complex filtering (e.g., filter=userName eq "john") and pagination according to the RFC 7644 specification.

sequenceDiagram participant IdP as Okta / Azure AD participant SCIM as SCIM Handler (scim.ts) participant SDK as LocalCMS SDK participant DB as Database IdP->>SCIM: POST /scim/v2/Users SCIM->>SCIM: Parse SCIM Schema SCIM->>SDK: cms.auth.createUser(data) SDK->>DB: INSERT INTO users ... SCIM-->>IdP: 201 Created (SCIM JSON)

4. Enterprise IdP Integration: SCIM, Certificate Rotation, & Audit Exports

Enterprise organizations require unified identity governance across multi-tenant environments:

Automated SCIM 2.0 Ingestion

  • Ingest user lifecycle state changes (new hires, department transfers, terminations) in sub-second timeframes.
  • Map custom enterprise claims and multi-tenant department assignments directly into SveltyCMS RBAC roles.

Per-Customer / Per-Tenant Certificate Rotation

  • Rotate SAML 2.0 signing certificates and OIDC client secrets independently per tenant without system-wide service disruption.
  • Fail-safe dual-certificate grace periods prevent accidental authentication lockouts during enterprise key rotation cycles.

Tamper-Evident SIEM Audit Log Exports

  • Stream security events (logins, privilege escalations, SCIM sync actions) to corporate SIEM endpoints (Splunk, Datadog, Elastic).
  • HMAC-SHA256 crypto-chained audit records guarantee verifiable non-repudiation for SOC 2 Type II and ISO 27001 compliance.

Related Documents

apiscimprovisioningenterpriseoktaazure-adentra-ididp-connectorcertificate-rotation
Was this page helpful?