System for Cross-domain Identity Management (SCIM) 2.0 enables automated user provisioning and deprovisioning between your identity provider and Cal.com. SCIM works alongside SSO to provide complete identity lifecycle management.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/calcom/cal.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
SCIM provides:- Automated User Provisioning: Automatically create users when added to IdP
- Deprovisioning: Remove access when users leave the organization
- Attribute Sync: Keep user profiles synchronized with IdP
- Group Management: Map IdP groups to Cal.com teams
- Real-time Updates: Changes in IdP reflect immediately in Cal.com
Prerequisites
- Cal.com Enterprise license
- Organizations feature enabled
- SSO/SAML configured (see SAML Setup)
- Identity Provider supporting SCIM 2.0
- SAML database configured
Supported Identity Providers
Cal.com supports SCIM with the following providers:| Provider | SCIM Version | Status |
|---|---|---|
| Azure AD / Entra ID | 2.0 | Fully Supported |
| Okta | 2.0 | Fully Supported |
| JumpCloud | 2.0 | Fully Supported |
| OneLogin | 2.0 | Fully Supported |
| Generic SCIM | 2.0 | Fully Supported |
packages/features/ee/dsync/lib/directoryProviders.ts:1-23
Setup Guide
1. Prerequisites Configuration
Ensure SSO/SAML is configured first:.env
.env.example:455-456
2. SCIM Endpoint Configuration
Cal.com exposes SCIM endpoints at:/Users- User management/Groups- Group/team management/ServiceProviderConfig- SCIM configuration/ResourceTypes- Supported resource types/Schemas- SCIM schema definitions
packages/features/ee/sso/lib/jackson.ts:24
3. Generate SCIM Token
- Log in to Cal.com as a SAML admin
- Navigate to Settings → Security → Directory Sync
- Select your organization
- Click “Create Directory”
- Choose your identity provider
- Copy the generated SCIM token and endpoint URL
4. Configure Identity Provider
Azure AD / Entra ID
- Navigate to your Enterprise Application
- Select Provisioning → Automatic
- Configure:
- Tenant URL:
https://your-domain.com/api/scim/v2.0 - Secret Token: [SCIM token from step 3]
- Tenant URL:
- Click “Test Connection”
- Configure Attribute Mappings:
- Set Provisioning Status to “On”
- Save and perform initial sync
Okta
- Navigate to Applications → Your SAML App
- Go to Provisioning tab → Configure API Integration
- Enable API integration
- Configure:
- Base URL:
https://your-domain.com/api/scim/v2.0 - API Token: [SCIM token from step 3]
- Base URL:
- Test API Credentials
- Enable provisioning features:
- ✅ Create Users
- ✅ Update User Attributes
- ✅ Deactivate Users
- ✅ Sync Password (optional)
- Configure Attribute Mappings:
- Save and assign users to application
JumpCloud
- Navigate to SSO Applications → Your Cal.com App
- Enable Identity Management
- Configure:
- SCIM Version: 2.0
- Base URL:
https://your-domain.com/api/scim/v2.0 - Token Key:
Authorization - Token Value:
Bearer [SCIM token]
- Configure Attribute Mappings:
- Activate provisioning
OneLogin
- Navigate to Applications → Your SAML App
- Go to Provisioning tab
- Enable Provisioning
- Configure:
- SCIM Base URL:
https://your-domain.com/api/scim/v2.0 - SCIM Bearer Token: [SCIM token from step 3]
- SCIM Base URL:
- Enable:
- ✅ Enable provisioning
- ✅ Create user
- ✅ Delete user
- ✅ Update user
- Configure Field Mappings
- Save and run provisioning
User Lifecycle Management
User Creation
When a user is assigned to the Cal.com app in your IdP:packages/features/ee/dsync/lib/handleUserEvents.ts:124-150
User Updates
When user attributes change in IdP:packages/features/ee/dsync/lib/handleUserEvents.ts:59-115
User Deactivation
When a user is unassigned or deactivated in IdP:packages/features/ee/dsync/lib/handleUserEvents.ts:116-122
User Deletion
When a user is permanently deleted from IdP:packages/features/ee/dsync/lib/removeUserFromOrg.ts
Custom Attribute Synchronization
SCIM can sync custom attributes beyond standard fields:SCIM Schema
Cal.com uses the standard SCIM 2.0 User schema:packages/features/ee/dsync/lib/getAttributesFromScimPayload.ts:11
Custom Attributes
Extract custom attributes from SCIM payload:packages/features/ee/dsync/lib/getAttributesFromScimPayload.ts:35-120
Attribute Assignment
Custom attributes are assigned to users in the organization context:packages/features/ee/dsync/lib/handleUserEvents.ts:49-56
Attribute Pools
Cal.com maintains separate pools for attribute assignments:- SCIM Pool: Attributes managed by SCIM directory
- Cal.com User Pool: Attributes managed by Cal.com users
- SCIM updates only affect SCIM pool attributes
- Cal.com users can override SCIM attributes (moves to User Pool)
- Multiple SCIM directories can coexist
- Deleting SCIM directory only removes its pool attributes
packages/features/ee/dsync/lib/assignValueToUserUtils.ts:14-35
Group Management
SCIM can map IdP groups to Cal.com teams:Group Events
packages/features/ee/dsync/lib/handleGroupEvents.ts
Team Mapping
Groups from IdP are automatically mapped to teams:- Group display name → Team name
- Group members → Team members
- Nested groups supported (if IdP supports)
Monitoring and Debugging
Enable SCIM Logging
Log SCIM requests for specific directories:.env
.env.example:455-456
Check Provisioning Status
- Log in as SAML admin
- Navigate to Settings → Security → Directory Sync
- View sync status and logs:
- Last sync time
- Users provisioned
- Errors and warnings
- Pending operations
Common Log Entries
Troubleshooting
SCIM Connection Test Fails
Solutions:- Verify SCIM endpoint URL is correct
- Check SCIM token is valid and not expired
- Ensure
SAML_DATABASE_URLis configured - Verify network connectivity to Cal.com
- Check firewall rules allow IdP to reach endpoint
Users Not Provisioning
Solutions:- Verify users are assigned to the application in IdP
- Check attribute mappings are correct
- Ensure email format is valid
- Verify organization auto-linking is configured
- Check user doesn’t already belong to another organization
packages/features/ee/dsync/lib/handleUserEvents.ts:81-83
Custom Attributes Not Syncing
Solutions:- Verify custom schema is included in SCIM payload
- Check attribute names match expected format
- Ensure custom attributes are mapped in IdP
- Review SCIM request logs with
DIRECTORY_IDS_TO_LOG
packages/features/ee/dsync/lib/getAttributesFromScimPayload.ts
Group Mapping Issues
Solutions:- Verify groups are assigned to application in IdP
- Check group provisioning is enabled
- Ensure group members have valid email addresses
- Verify team creation permissions in Cal.com
packages/features/ee/dsync/lib/handleGroupEvents.ts
User Belongs to Another Organization
Error: “User belongs to another organization.” Solution: Users can only belong to one organization at a time. To migrate:- Remove user from current organization
- Re-provision through SCIM
packages/features/ee/dsync/lib/handleUserEvents.ts:81-83
Permission Denied Errors
Solutions:- Verify you’re logged in as SAML admin
- Check email is in
SAML_ADMINSenvironment variable - For hosted deployments, verify organization Owner/Admin role
- Ensure SCIM token has correct permissions
Security Best Practices
- Rotate Tokens: Regularly rotate SCIM bearer tokens
- Limit Scope: Use minimum required permissions for SCIM token
- Monitor Logs: Review provisioning logs for suspicious activity
- Enable HTTPS: Always use HTTPS for SCIM endpoints
- Validate Requests: Cal.com validates all SCIM requests against schema
- Audit Events: Track user provisioning and deprovisioning events
- Secure Database: Ensure SAML database has proper access controls
Performance Considerations
Initial Sync
First-time provisioning may take time for large organizations:- < 100 users: Few minutes
- 100-1000 users: 10-30 minutes
- > 1000 users: May require batching
Ongoing Sync
Real-time updates typically process within seconds:- User creation: 1-3 seconds
- User update: < 1 second
- User deactivation: 1-2 seconds
- Group operations: 2-5 seconds
Rate Limiting
Cal.com implements rate limiting on SCIM endpoints to prevent abuse. If you encounter rate limits:- Reduce sync frequency in IdP
- Batch operations where possible
- Contact support for rate limit increases
API Reference
SCIM Endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/api/scim/v2.0/Users | GET | List users |
/api/scim/v2.0/Users | POST | Create user |
/api/scim/v2.0/Users/{id} | GET | Get user |
/api/scim/v2.0/Users/{id} | PUT | Update user |
/api/scim/v2.0/Users/{id} | PATCH | Partial update user |
/api/scim/v2.0/Users/{id} | DELETE | Delete user |
/api/scim/v2.0/Groups | GET | List groups |
/api/scim/v2.0/Groups | POST | Create group |
/api/scim/v2.0/Groups/{id} | GET | Get group |
/api/scim/v2.0/Groups/{id} | PUT | Update group |
/api/scim/v2.0/Groups/{id} | PATCH | Partial update group |
/api/scim/v2.0/Groups/{id} | DELETE | Delete group |
/api/scim/v2.0/ServiceProviderConfig | GET | Get SCIM config |
/api/scim/v2.0/ResourceTypes | GET | Get resource types |
/api/scim/v2.0/Schemas | GET | Get schemas |
Authentication
All SCIM requests require Bearer token authentication:Advanced Configuration
Multiple SCIM Directories
Organizations can configure multiple SCIM directories:packages/features/ee/dsync/lib/assignValueToUserUtils.ts:14-35
Custom Attribute Mapping
Map IdP-specific attributes to Cal.com fields:Testing SCIM Integration
1. Test User Creation
- Assign a test user to the application in your IdP
- Wait for provisioning to complete
- Verify user appears in Cal.com
- Check user has correct attributes
2. Test User Update
- Update user attributes in IdP (e.g., name)
- Wait for sync
- Verify changes reflect in Cal.com
3. Test User Deactivation
- Unassign user from application in IdP
- Wait for deprovisioning
- Verify user loses organization access
- Confirm user account still exists
4. Test Group Provisioning
- Create a group in IdP
- Assign users to group
- Assign group to Cal.com application
- Verify team is created in Cal.com
- Confirm group members are team members