SCIM docs
SCIM provisioning for ShareOTP
ShareOTP exposes a workspace-scoped SCIM 2.0 surface for identity-provider-driven user provisioning and deprovisioning.
Authentication
Generate a SCIM bearer token in Admin - Settings - Security. Tokens are workspace-scoped, shown once when created, and independent from normal ShareOTP REST API keys.
curl https://your-domain.com/api/scim/v2/ServiceProviderConfig \ -H "Authorization: Bearer scim_shareotp_..."
Supported endpoints
Supported user fields
The SCIM implementation is intentionally focused on workforce sync for ShareOTP users.
Roles are ignored unless SCIM role sync is enabled in workspace settings. When enabled, only valid ADMIN and MEMBER values are accepted, and ShareOTP blocks changes that would leave the workspace without an active admin.
Supported filters
Use filters for directory reconcile jobs and identity-provider lookups.
Examples
curl https://your-domain.com/api/scim/v2/Users \
-H "Authorization: Bearer scim_shareotp_..." \
-H "Content-Type: application/scim+json" \
-d '{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"externalId": "00u123",
"userName": "[email protected]",
"displayName": "Alice Example",
"active": true,
"emails": [{ "value": "[email protected]", "primary": true }]
}'curl "https://your-domain.com/api/scim/v2/Users?filter=externalId%20pr&startIndex=1&count=100" \ -H "Authorization: Bearer scim_shareotp_..."
Departments and nested Groups
Manage manual departments at Admin → Departments, or provision them through SCIM Groups. Manual departments are outside the SCIM Groups lane. An administrator must explicitly share an OTP account with a department before its members can access it.
Use the core Group schema with a stable externalId and displayName. Direct members of type User are employees; members of type Group are direct subdepartments. Each department has one parent; cycles and multiple parents are rejected. Members must reference existing ShareOTP resource IDs in the same workspace.
- Provision Users and establish every Group, retaining returned IDs.
- PUT each Group with its exact direct User members and child Groups. Omitted members means empty; repeat PUT does not duplicate memberships.
- To move a child, remove it from its old parent before adding it to the new one. PATCH supports add, replace and remove, including a members[value eq "id"] removal path.
- Move or delete children before DELETE on their parent. Department deletion preserves user accounts. A missing group in a failed source walk is not a deletion instruction.
POST creates a department; duplicate active externalId returns 409. Groups support id, externalId and displayName equality filters, externalId pr, and pagination with count=0. Token rotation preserves identities. Last group update indicates a successful write to that Group, not a completed directory sync.
Deprovisioning behavior
When SCIM sets active=false, ShareOTP soft-disables the user, revokes their API keys and org-level artifacts, deletes account permissions and login/session artifacts, removes manual and synced department memberships, and removes them from active seat usage. Reactivation does not automatically restore removed memberships.
curl https://your-domain.com/api/scim/v2/Users/user_123 \
-X PATCH \
-H "Authorization: Bearer scim_shareotp_..." \
-H "Content-Type: application/scim+json" \
-d '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{ "op": "replace", "path": "active", "value": false }
]
}'- Upsert every active user with POST /Users.
- List managed users with GET /Users?filter=externalId pr.
- PATCH active=false for previously managed users that no longer exist in the source directory.