Scim Scim protocol schemas
System for Cross-domain Identity Management (SCIM) 2.0 specification
implementation for ObjectStack.
SCIM 2.0 is an HTTP-based protocol for managing user and group identities
across domains. It provides a standardized REST API for user provisioning,
de-provisioning, and synchronization.
Enterprise SSO Integration
Integrate with Okta, Azure AD, OneLogin
Automatic user provisioning from corporate directory
Just-in-Time (JIT) user creation on first login
User Lifecycle Management
Automatically create users when they join organization
Update user attributes when they change roles
Deactivate users when they leave organization
Group/Department Synchronization
Sync organizational structure from AD/LDAP
Maintain group memberships automatically
Map corporate roles to application permissions
Compliance & Audit
Maintain accurate user directory
Track all identity changes
Meet SOX/HIPAA requirements for user management
RFC 7643 : SCIM Core Schema
RFC 7644 : SCIM Protocol
RFC 7642 : SCIM Requirements
Okta : Leading SCIM provider
Azure AD : Microsoft's identity platform
OneLogin : Enterprise SSO provider
Google Workspace : Google's identity management
See also: https://datatracker.ietf.org/doc/html/rfc7643
See also: https://datatracker.ietf.org/doc/html/rfc7644
Source: packages/spec/src/identity/scim.zod.ts
import { SCIMAddressSchema, SCIMBulkOperationSchema, SCIMBulkRequestSchema, SCIMBulkResponseSchema, SCIMBulkResponseOperationSchema, SCIMEmailSchema, SCIMEnterpriseUserSchema, SCIMErrorSchema, SCIMGroupSchema, SCIMGroupReferenceSchema, SCIMListResponseSchema, SCIMMemberReferenceSchema, SCIMMetaSchema, SCIMNameSchema, SCIMPatchOperationSchema, SCIMPatchRequestSchema, SCIMPhoneNumberSchema, SCIMUserSchema } from '@objectstack/spec/identity' ;
import type { SCIMAddress, SCIMBulkOperation, SCIMBulkRequest, SCIMBulkResponse, SCIMBulkResponseOperation, SCIMEmail, SCIMEnterpriseUser, SCIMError, SCIMGroup, SCIMGroupReference, SCIMListResponse, SCIMMemberReference, SCIMMeta, SCIMName, SCIMPatchOperation, SCIMPatchRequest, SCIMPhoneNumber, SCIMUser } from '@objectstack/spec/identity' ;
// Validate data
const result = SCIMAddressSchema. parse (data);
Property Type Required Description formatted stringoptional Formatted address streetAddress stringoptional Street address locality stringoptional City/Locality region stringoptional State/Region postalCode stringoptional Postal code country stringoptional Country type Enum<'work' | 'home' | 'other'>optional Address type primary boolean✅ Primary address indicator
Property Type Required Description method Enum<'POST' | 'PUT' | 'PATCH' | 'DELETE'>✅ HTTP method for the bulk operation path string✅ Resource endpoint path (e.g. /Users, /Groups/{id}) bulkId stringoptional Client-assigned ID for cross-referencing between operations data Record<string, any>optional Request body for POST/PUT/PATCH operations version stringoptional ETag for optimistic concurrency control
Property Type Required Description schemas 'urn:ietf:params:scim:api:messages:2.0:BulkRequest'[]✅ SCIM schema URIs (BulkRequest) operations { method: Enum<'POST' | 'PUT' | 'PATCH' | 'DELETE'>; path: string; bulkId?: string; data?: Record<string, any>; … }[]✅ Bulk operations to execute (minimum 1) failOnErrors integeroptional Stop processing after this many errors
Property Type Required Description schemas 'urn:ietf:params:scim:api:messages:2.0:BulkResponse'[]✅ SCIM schema URIs (BulkResponse) operations { method: Enum<'POST' | 'PUT' | 'PATCH' | 'DELETE'>; bulkId?: string; location?: string; status: string; … }[]✅ Results for each bulk operation
Property Type Required Description method Enum<'POST' | 'PUT' | 'PATCH' | 'DELETE'>✅ HTTP method that was executed bulkId stringoptional Client-assigned bulk operation ID location stringoptional URL of the created or modified resource status string✅ HTTP status code as string (e.g. "201", "400") response anyoptional Response body (typically present for errors)
Property Type Required Description value string✅ Email address type Enum<'work' | 'home' | 'other'>optional Email type display stringoptional Display label primary boolean✅ Primary email indicator
Property Type Required Description employeeNumber stringoptional Employee number costCenter stringoptional Cost center organization stringoptional Organization division stringoptional Division department stringoptional Department manager { value: string; $ref?: string; displayName?: string }optional Manager reference
Property Type Required Description schemas string[]✅ SCIM schema URIs status integer✅ HTTP status code scimType Enum<'invalidFilter' | 'tooMany' | 'uniqueness' | 'mutability' | 'invalidSyntax' | 'invalidPath' | 'noTarget' | 'invalidValue' | 'invalidVers' | 'sensitive'>optional SCIM error type detail stringoptional Error detail message
Property Type Required Description schemas string[]✅ SCIM schema URIs (must include Group schema) id stringoptional Unique resource identifier externalId stringoptional External identifier from client system displayName string✅ Group display name (REQUIRED) members { value: string; $ref?: string; type?: Enum<'User' | 'Group'>; display?: string }[]optional Group members meta { resourceType?: string; created?: string; lastModified?: string; location?: string; … }optional Resource metadata
Property Type Required Description value string✅ Group ID $ref stringoptional URI reference to the group display stringoptional Group display name type Enum<'direct' | 'indirect'>optional Membership type
Property Type Required Description schemas string[]✅ SCIM schema URIs totalResults integer✅ Total results count Resources ({ schemas: string[]; id?: string; externalId?: string; userName: string; … } | { schemas: string[]; id?: string; externalId?: string; displayName: string; … } | Record<string, any>)[]✅ Resources array (Users, Groups, or custom resources) startIndex integeroptional Start index (1-based) itemsPerPage integeroptional Items per page
Property Type Required Description value string✅ Member ID $ref stringoptional URI reference to the member type Enum<'User' | 'Group'>optional Member type display stringoptional Member display name
Property Type Required Description resourceType stringoptional Resource type created stringoptional Creation timestamp lastModified stringoptional Last modification timestamp location stringoptional Resource location URI version stringoptional Entity tag (ETag) for concurrency control
Property Type Required Description formatted stringoptional Formatted full name familyName stringoptional Family name (last name) givenName stringoptional Given name (first name) middleName stringoptional Middle name honorificPrefix stringoptional Honorific prefix (Mr., Ms., Dr.) honorificSuffix stringoptional Honorific suffix (Jr., Sr.)
Property Type Required Description op Enum<'add' | 'remove' | 'replace'>✅ Operation type path stringoptional Attribute path (optional for add) value anyoptional Value to set
Property Type Required Description schemas string[]✅ SCIM schema URIs Operations { op: Enum<'add' | 'remove' | 'replace'>; path?: string; value?: any }[]✅ Patch operations
Property Type Required Description value string✅ Phone number type Enum<'work' | 'home' | 'mobile' | 'fax' | 'pager' | 'other'>optional Phone number type display stringoptional Display label primary boolean✅ Primary phone indicator
Property Type Required Description schemas string[]✅ SCIM schema URIs (must include User schema) id stringoptional Unique resource identifier externalId stringoptional External identifier from client system userName string✅ Unique username (REQUIRED) name { formatted?: string; familyName?: string; givenName?: string; middleName?: string; … }optional Structured name components displayName stringoptional Display name for UI nickName stringoptional Nickname profileUrl stringoptional Profile page URL title stringoptional Job title userType stringoptional User type (employee, contractor) preferredLanguage stringoptional Preferred language (ISO 639-1) locale stringoptional Locale (e.g., en-US) timezone stringoptional Timezone active boolean✅ Account active status password stringoptional Password (write-only) emails { value: string; type?: Enum<'work' | 'home' | 'other'>; display?: string; primary: boolean }[]optional Email addresses phoneNumbers { value: string; type?: Enum<'work' | 'home' | 'mobile' | 'fax' | 'pager' | 'other'>; display?: string; primary: boolean }[]optional Phone numbers ims { value: string; type?: string; primary?: boolean }[]optional IM addresses photos { value: string; type?: Enum<'photo' | 'thumbnail'>; primary?: boolean }[]optional Photo URLs addresses { formatted?: string; streetAddress?: string; locality?: string; region?: string; … }[]optional Physical addresses groups { value: string; $ref?: string; display?: string; type?: Enum<'direct' | 'indirect'> }[]optional Group memberships entitlements { value: string; type?: string; primary?: boolean }[]optional Entitlements roles { value: string; type?: string; primary?: boolean }[]optional Roles x509Certificates { value: string; type?: string; primary?: boolean }[]optional X509 certificates meta { resourceType?: string; created?: string; lastModified?: string; location?: string; … }optional Resource metadata urn:ietf:params:scim:schemas:extension:enterprise:2.0:User { employeeNumber?: string; costCenter?: string; organization?: string; division?: string; … }optional Enterprise user attributes