.agents/features/scim.md
SCIM (System for Cross-domain Identity Management) 2.0 integration allows enterprise Identity Providers (IdPs) such as Okta, Azure AD, and Google Workspace to automatically provision, update, and deprovision users and groups in Activepieces. Users map directly to Activepieces platform users; Groups map to Activepieces projects (only ProjectType.TEAM projects). Authentication uses an API key passed as a Bearer token (platformAdminOnly SERVICE principal). The module also exposes the SCIM discovery endpoints (ServiceProviderConfig, ResourceTypes, Schemas) for IdP auto-configuration. Gated by platform.plan.scimEnabled.
packages/server/api/src/app/ee/scim/scim-module.ts — module registration, scimEnabled guard, application/scim+json content type parserpackages/server/api/src/app/ee/scim/scim-user-controller.ts — user CRUD endpointspackages/server/api/src/app/ee/scim/scim-user-service.ts — user provisioning logicpackages/server/api/src/app/ee/scim/scim-group-controller.ts — group CRUD endpointspackages/server/api/src/app/ee/scim/scim-group-service.ts — group/project management logicpackages/server/api/src/app/ee/scim/scim-discovery-controller.ts — discovery endpoints (ServiceProviderConfig, ResourceTypes, Schemas)packages/shared/src/lib/ee/scim/index.ts — all SCIM types, schemas, constants, parseScimFilter, ScimErrorEnterprise and Cloud. Gated by platform.plan.scimEnabled. Module hook: platformMustHaveFeatureEnabled((platform) => platform.plan.scimEnabled).
User + UserIdentity on the platform.Project with type = TEAM.UserStatus.ACTIVE / UserStatus.INACTIVE.urn:ietf:params:scim:schemas:activepieces:1.0:CustomUserAttributes — carries platformRole for assigning admin vs. member roles during provisioning.AppSystemProp.SCIM_DEFAULT_PROJECT_ROLE) controlling the role assigned when adding a user to a group (project). Defaults to EDITOR.The module registers an application/scim+json parser so IdPs that use this MIME type are handled correctly (most IdPs send SCIM+JSON, not plain JSON).
All require platformAdminOnly([SERVICE]) (API key auth). Prefix: /v1/scim/v2.
/v1/scim/v2/Users)| Method | Path | Description |
|---|---|---|
| GET | /Users | List users with optional filter (supports userName eq "...") |
| GET | /Users/:id | Get user by ID |
| POST | /Users | Create (provision) a user |
| PUT | /Users/:id | Replace (full update) a user |
| PATCH | /Users/:id | Partial update (supports replace operations on active, externalId) |
| DELETE | /Users/:id | Deactivate a user (sets status to INACTIVE) |
/v1/scim/v2/Groups)| Method | Path | Description |
|---|---|---|
| GET | /Groups | List groups (maps to TEAM projects) with optional filter (supports displayName eq "...") |
| GET | /Groups/:id | Get group by ID |
| POST | /Groups | Create a group (creates a new TEAM project) |
| PUT | /Groups/:id | Replace group (updates displayName, replaces full member list) |
| PATCH | /Groups/:id | Partial update (add/remove members, rename) |
| DELETE | /Groups/:id | Delete group (marks project for deletion) |
/v1/scim/v2)| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /ServiceProviderConfig | Platform admin (USER or SERVICE) | SCIM capability advertisement |
| GET | /ResourceTypes | Platform admin (USER or SERVICE) | Lists User and Group resource types |
| GET | /Schemas | Platform admin (USER or SERVICE) | Full schema definitions for User and Group |
When creating a user via SCIM:
externalId (conflict if found).UserIdentity by the normalized email. New identities use UserIdentityProvider.SAML.getOrCreateWithProject.status and platformRole from request fields.emailService.sendScimUserWelcome.DELETE maps to deactivation, not hard deletion: status is set to INACTIVE.
SCIM Groups map to Activepieces projects with type = TEAM:
displayName and optional externalId.SCIM_DEFAULT_PROJECT_ROLE.platformProjectService.markForDeletion.TEAM type projects appear in SCIM group listings; personal projects are excluded.| Capability | Supported |
|---|---|
| Patch | Yes |
| Bulk operations | No |
| Filter | Yes (max 100 results) |
| Password change | No |
| Sort | No |
| ETag | No |
| Authentication | OAuth Bearer Token (API key) |