SCIM Provisioning
SCIM (System for Cross-domain Identity Management) lets your identity provider keep Consentio in step with your directory: creating users as they join, updating them as they change, deactivating them as they leave, and mirroring the groups that decide what they can reach.
This page covers everything common to the SCIM API. The pages that follow go resource by resource.
Base URL and authentication
| Setting | Value |
|---|---|
| SCIM base URL | https://api.consentio.co/v2/scim2 |
| Authentication | Bearer token |
| Content type | application/scim+json |
GET /v2/scim2/Users HTTP/1.1
Host: api.consentio.co
Authorization: Bearer <your-scim-token>
Content-Type: application/scim+json
The token identifies your organisation — there is no organisation ID in the path — and every request is scoped to it. Your integration contact issues the token.
Token permissions
| Permission | Grants |
|---|---|
scim:provisioning |
The user and group lifecycle, and read access to the role catalogue |
scim:roles |
Write access to the role catalogue, which Consentio reserves to itself |
A provisioning token covers everything an identity provider has to do. Consentio owns the role catalogue, so writes to it are not delegated; see Role Management.
A request made without the permission an endpoint requires is answered with 403 Forbidden.
Endpoints
| Resource | Endpoint | Purpose |
|---|---|---|
| Users | /v2/scim2/Users |
User lifecycle |
| Groups | /v2/scim2/Groups |
Groups and membership |
| Roles | /v2/scim2/Roles |
The role catalogue, read-only to a provisioning token |
| Bulk | /v2/scim2/Bulk |
Batched operations |
| Service config | /v2/scim2/ServiceProviderConfig |
Advertised capabilities |
| Schemas | /v2/scim2/Schemas |
Supported schemas |
| Resource types | /v2/scim2/ResourceTypes |
Supported resource types |
Supported operations
| Operation | Users | Groups | Roles |
|---|---|---|---|
Create (POST) |
Yes | Yes | Consentio only |
Read (GET) |
Yes | Yes | Yes |
List (GET) |
Yes | Yes | Yes |
Replace (PUT) |
Yes | Yes | Consentio only |
Update (PATCH) |
Yes | Yes | Consentio only |
Delete (DELETE) |
Deactivates the user | Yes | Consentio only |
| Filter | Yes | Yes | No |
| Bulk | Yes | Yes | Consentio only |
DELETE /Users/{id}deactivates the account rather than erasing it, so history stays attributable. See Deactivating a user.
Schemas
| Purpose | URN |
|---|---|
| User | urn:ietf:params:scim:schemas:core:2.0:User |
| User extension | urn:consentio:params:scim:schemas:extension:User:1.0 |
| Group | urn:ietf:params:scim:schemas:core:2.0:Group |
| Group extension | urn:consentio:params:scim:schemas:extension:Group:1.0 |
| Role | urn:consentio:params:scim:schemas:Role:1.0 |
Both Consentio extensions add one attribute, roles: a list of role IDs assigned to the user or group.
Attribute mapping
Users
| Your directory | SCIM attribute | Required |
|---|---|---|
| User ID | externalId |
Recommended |
| Username / UPN | userName |
Send the email address. Accepted but not read |
emails[*].value |
Yes — the first entry is the address Consentio provisions | |
| First name | name.givenName |
Recommended |
| Last name | name.familyName |
Recommended |
| Display name | displayName |
Used when no given or family name is sent |
| Active | active |
Optional; a new user is created active unless you send false |
The email domain must be one of the domains agreed for your organisation. Anything else is refused with 400.
Groups
| Your directory | SCIM attribute | Required |
|---|---|---|
| Group ID | externalId |
Recommended |
| Group name | displayName |
Yes |
| Members | members |
Optional |
Role assignment
Roles are assigned through the Consentio extension, as a list of Consentio role IDs:
{
"urn:consentio:params:scim:schemas:extension:User:1.0": {
"roles": ["3f1a8c24-5b6d-4a2e-9c77-0b1d2e3f4a5b"]
}
}
{
"urn:consentio:params:scim:schemas:extension:Group:1.0": {
"roles": ["3f1a8c24-5b6d-4a2e-9c77-0b1d2e3f4a5b"]
}
}
Roles already exist — Consentio creates them with each workspace. Read the catalogue first and bind to the IDs you find there. See Role Management.
External IDs
Set externalId on everything you create. Consentio stores it alongside its own ID and lets you filter on it, which is what makes a resync idempotent when your side has lost track of the Consentio ID.
Create a user carrying your identifier:
POST /v2/scim2/Users
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"externalId": "your-idp-user-id",
"userName": "john.smith@acme.com",
"displayName": "John Smith",
"emails": [{ "value": "john.smith@acme.com", "primary": true }]
}
Find it again:
GET /v2/scim2/Users?filter=externalId eq "your-idp-user-id"
Resource IDs
Consentio resource IDs are UUIDs, and they are what the id field, the Location header and every $ref carry:
https://api.consentio.co/v2/scim2/Users/8c1f4d2a-7e93-4b6f-a1c5-2d0e9f7b3a84
Treat them as opaque. Do not construct them, and do not assume any relationship between a user's SCIM ID and any other identifier Consentio shows elsewhere.
Listing, filtering and sorting
Pagination
| Parameter | Meaning | Default | Maximum |
|---|---|---|---|
startIndex |
First result, 1-based | 1 |
— |
count |
Results per page | 100 |
200 |
List responses are SCIM ListResponse documents carrying totalResults, startIndex and itemsPerPage. totalResults counts everything matching the filter, not the page.
A count above the maximum is reduced to it rather than refused, so page on a count of 200 or below. The same maximum is advertised as filter.maxResults in ServiceProviderConfig.
itemsPerPage reports how many resources are on the page returned, which on the last page is fewer than count.
Filters
Filtering supports single eq conditions. Compound expressions with and, or or not are not supported, and a filter that is not understood is refused with 400 and scimType: invalidFilter rather than quietly returning everything.
Attribute names and operators are case-insensitive, so displayName eq, DisplayName EQ and displayname Eq are the same filter. Whether the value is depends on the attribute: userName ignores case, because it holds an email address; the others match exactly.
| Resource | Supported filters |
|---|---|
| Users | userName eq "…", externalId eq "…", active eq true / false |
| Groups | displayName eq "…", externalId eq "…" |
| Roles | displayName eq "…", externalId eq "…" |
Every eq matches the whole value, so displayName eq "Sales" returns the group called Sales and not the one called Sales EMEA. userName eq also ignores case, which is the right behaviour for an email address.
For users and groups, filter on externalId: it identifies one resource and survives a display name being changed on either side. For roles it does not, because every workspace carries the same externalId — pick the result whose scopeId is the workspace you mean, or fetch the role by its Consentio id.
Sorting
Every list endpoint accepts sortBy, with sortOrder set to asc or desc; ascending is the default. The SCIM spelling descending is accepted too.
| Resource | sortBy values |
|---|---|
| Users | userName, externalId, displayName, id |
| Groups | displayName, externalId, id |
| Roles | displayName, externalId, id |
An unrecognised sortBy is ignored and the default ordering applies.
Bulk operations
POST /v2/scim2/Bulk applies several operations in one request, following RFC 7644 section 3.7.
| Limit | Value |
|---|---|
| Operations per request | 100 |
| Payload size | 1 MB |
Operations run sequentially, in the order given. Each one reports its own status, so a bulk request can come back partly successful; always read the per-operation results rather than the HTTP status alone. A bulkId on a create can be referenced by a later operation as bulkId:<your-id> wherever an ID is expected, which is how you create a group and its members in a single request.
Role writes inside a bulk request need the scim:roles permission, exactly as they do on their own endpoints.
Provisioning order
Roles already exist, so a first sync has only two dependencies to respect:
1. Read the role catalogue GET /v2/scim2/Roles
↓
2. Provision users POST /v2/scim2/Users
↓
3. Create groups, add members,
bind them to roles POST /v2/scim2/Groups
For ongoing synchronisation, a cycle every 15 to 60 minutes suits most directories. Deactivations deserve better than that: send them as they happen, since they are what withdraws access.
Error handling
Errors are returned as SCIM error documents:
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
"detail": "email domain not allowed",
"status": "400"
}
| Status | Meaning |
|---|---|
400 |
Malformed request, missing required field, or an email domain outside your organisation |
401 |
Missing, malformed or expired bearer token |
403 |
The token lacks the permission the endpoint requires, or the target is a Consentio-managed role |
404 |
The resource does not exist, or is not visible to your organisation |
A
403raised by the permission check is returned in the platform's own error format,{"code": "Forbidden"}, rather than as a SCIM error document. Treat the status code as authoritative when parsing errors.
Verifying your setup
Check the connection and the advertised capabilities:
curl -s "https://api.consentio.co/v2/scim2/ServiceProviderConfig" \
-H "Authorization: Bearer <token>"
Read the role catalogue:
curl -s "https://api.consentio.co/v2/scim2/Roles" \
-H "Authorization: Bearer <token>"
Create a test user:
curl -s -X POST "https://api.consentio.co/v2/scim2/Users" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/scim+json" \
-d '{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"externalId": "test-001",
"userName": "test.user@acme.com",
"name": { "givenName": "Test", "familyName": "User" },
"emails": [{ "value": "test.user@acme.com", "primary": true }],
"active": true
}'
Next steps
- Role Management — the role catalogue and how access is derived.
- User Management — the user lifecycle in detail.
- Group Management — groups, membership and role binding.