brain/wiki/connections-auth/scim.md
SCIM 2.0 provisioning: lets enterprise IdPs (Okta, Azure AD, Google Workspace) automatically provision, update, and deprovision users and groups. SCIM Users map to AP platform users; SCIM Groups map to AP TEAM projects only. Auth is an API key as a Bearer token (platformAdminOnly [SERVICE]). Gated by platform.plan.scimEnabled (EE/Cloud).
User + UserIdentity (new identities use UserIdentityProvider.SAML).Project with type = TEAM (personal projects excluded from listings).active maps to UserStatus.ACTIVE/INACTIVE; externalId stored on the AP entity....activepieces:1.0:CustomUserAttributes carries platformRole./v1/scim/v2. Registers an application/scim+json content-type parser (most IdPs send SCIM+JSON)./Users (filter supports userName eq "...", max 100 results)./Groups (filter displayName eq "..."); create makes a new TEAM project, member add upserts membership with SCIM_DEFAULT_PROJECT_ROLE (env var, defaults EDITOR), delete calls markForDeletion.GET /ServiceProviderConfig, /ResourceTypes, /Schemas.status set to INACTIVE.externalId or by identity on the platform.emailService.sendScimUserWelcome.Entry point: scimModule, registered twice in packages/server/api/src/app/app.ts.
packages/server/api/src/app/ee/scim/ — the whole server slice: module registration and scimEnabled guard, user/group/discovery controllers, user and group servicespackages/core/shared/src/lib/ee/scim/index.ts — all SCIM types, schemas, constants, parseScimFilter, ScimErrorpackages/server/api/test/integration/ee/scim/ — integration tests covering the endpointsdocs/admin-guide/guides/scim/ — customer-facing IdP setup docsPaths verified 2026-07-17.