SCIM schema reference
The exact SCIM 2.0 schemas ulex implements: ServiceProviderConfig, the core User and Group schemas with every sub-attribute and mutability rule, PatchOp, Bulk, ListResponse and Error, plus the filter grammar ulex accepts.
RFC 7643 and RFC 7644, as implemented. Where ulex deviates or constrains, it says so.
#Discovery
curl -sS "$BASE/scim/v2/ServiceProviderConfig" -H "Authorization: Bearer $SCIM_TOKEN"{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig"],
"documentationUri": "https://docs.ulexid.com/scim/schema-reference",
"patch": { "supported": true },
"bulk": { "supported": true, "maxOperations": 100, "maxPayloadSize": 10485760 },
"filter": {
"supported": true,
"maxResults": 200,
"comparisonOperators": ["eq", "ne", "co", "sw", "ew", "gt", "lt", "ge", "le", "pr"],
"caseExact": false,
"complexAttributes": false
},
"changePassword": { "supported": false },
"sort": { "supported": true },
"etag": { "supported": true },
"authenticationSchemes": [
{
"type": "oauthbearertoken",
"name": "OAuth Bearer Token",
"description": "Authentication with a directory-scoped bearer token",
"specUri": "http://www.rfc-editor.org/info/rfc6750",
"primary": true
}
]
}| Capability | ulex |
|---|---|
| PATCH | yes |
| Bulk | yes, 100 operations, 10 MiB |
| Filtering | eq ne co sw ew gt lt ge le pr, and or not, parentheses, attribute paths |
| Complex attribute filters | no — one attribute path per filter |
| Sorting | yes, one attribute |
| ETags | yes, W/"vN.M" |
changePassword | no. Passwords are not a SCIM-managed attribute in ulex |
POST /Users with password | rejected with 400 invalidValue |
| Mutual TLS | not used; bearer token only |
| Sub-attribute search | yes: emails[type eq "work"].value |
curl -sS "$BASE/scim/v2/ResourceTypes" -H "Authorization: Bearer $SCIM_TOKEN"{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 2,
"itemsPerPage": 2,
"startIndex": 1,
"Resources": [
{ "id": "User", "endpoint": "/Users", "schema": "urn:ietf:params:scim:schemas:core:2.0:User", "meta": { "location": "/Users", "resourceType": "ResourceType" } },
{ "id": "Group", "endpoint": "/Groups", "schema": "urn:ietf:params:scim:schemas:core:2.0:Group", "meta": { "location": "/Groups", "resourceType": "ResourceType" } }
]
}curl -sS "$BASE/scim/v2/Schemas" -H "Authorization: Bearer $SCIM_TOKEN" | jq -r '.Resources[].id'urn:ietf:params:scim:schemas:core:2.0:User
urn:ietf:params:scim:schemas:core:2.0:Group
urn:ietf:params:scim:api:messages:2.0:PatchOp
urn:ietf:params:scim:api:messages:2.0:BulkRequest
urn:ietf:params:scim:api:messages:2.0:BulkResponse
urn:ietf:params:scim:api:messages:2.0:ListResponse
urn:ietf:params:scim:api:messages:2.0:ErrorThe enterprise extension urn:ietf:params:scim:schemas:extension:enterprise:2.0:User is accepted and echoed on create and patch, and its sub-attributes are stored under user.metadata.enterprise. ulex does not index them, and it does not validate them beyond JSON typing — the schema is not returned by /Schemas.
#User
urn:ietf:params:scim:schemas:core:2.0:User
#Required
| Attribute | Type | Case exact | Mutability | Notes |
|---|---|---|---|---|
schemas | complex | — | readOnly | must contain the User schema URN |
id | string | — | readOnly | the ulex usr_… id |
userName | string | false | readWrite | unique per directory; usually the email. Required on POST |
#Optional, readWrite
| Attribute | Type | Max length | Maps to |
|---|---|---|---|
externalId | string | 255 | user.external_id. The join key across syncs |
name.givenName | string | 80 | user.first_name |
name.familyName | string | 80 | user.last_name |
name.formatted | string | 160 | user.display_name when displayName is absent |
displayName | string | 160 | user.display_name |
nickName | string | 64 | user.scim.nick_name |
profileUrl | reference | 2048 | user.scim.profile_url |
title | string | 120 | user.job_title |
userType | string | 255 | user.scim.user_type |
preferredLanguage | string | 35 | user.scim.preferred_language |
locale | string | 35 | user.scim.locale |
timezone | string | 64 | user.scim.timezone |
active | boolean | — | true → status: active; false → status: suspended |
#Optional, multi-valued
| Attribute | Sub-attributes | Notes |
|---|---|---|
emails | value (required), type, primary, display | type ∈ work | home | other. The primary: true value is the one stored as user.email |
phoneNumbers | value, type, primary | not stored. value is hashed into mfa_factor.target_hint if a factor is enrolled; otherwise discarded |
imgs | value, type, primary | not stored |
photos | value, type, primary | not stored |
addresses | formatted, streetAddress, locality, region, postalCode, country, type | not stored |
roles | value, display, type, primary | stored under user.metadata.roles; not used for authorization |
groups | value, $ref, display, type | readOnly on a User. Set membership through /Groups, not through a User |
entitlements | value, display, type, primary | stored under user.metadata.entitlements; not used for authorization |
phoneNumbers is not stored. That is PHI minimisation, not an omission bug: a phone number is personal data, ulex has no feature that needs it, and not storing it is the simplest way to not have to protect it. If your IdP sends one, it is accepted, ignored, and not echoed back in the stored resource.
#meta
"meta": {
"resourceType": "User",
"created": "2026-09-29T14:47:03.000Z",
"lastModified": "2026-09-29T14:49:41.000Z",
"version": "W/\"v1.1\"",
"location": "https://ulexid.com/api/v1/scim/v2/Users/usr_01M3PSWBPGS08FWV4NV7P9VNFN"
}version is an ETag. Increment it on every write. Send it in If-Match on PUT and PATCH; a stale value is 412 with scimType: "mutability". Use If-None-Match: * on POST to assert the user does not exist yet.
#Rejected
| Attribute | Result |
|---|---|
password | 400 invalidValue. ulex does not accept passwords over SCIM |
groups on POST/PUT/PATCH | 400 mutability. Read-only; use /Groups |
emails with no primary: true | accepted; the first value is used |
emails with two primary: true | 400 invalidValue |
id different from the URL on PUT | 400 mutability |
schemas missing the User URN | 400 invalidValue |
#Full example
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": "usr_01M3PSWBPGS08FWV4NV7P9VNFN",
"externalId": "okta-00u9xK2mB7yLt4N",
"userName": "pat@acme.example",
"name": { "givenName": "Pat", "familyName": "Iyer", "formatted": "Pat Iyer" },
"displayName": "Pat Iyer",
"nickName": "pat",
"title": "Support Engineer",
"userType": "Employee",
"preferredLanguage": "en-US",
"locale": "en-US",
"timezone": "America/New_York",
"active": true,
"emails": [{ "value": "pat@acme.example", "type": "work", "primary": true }],
"roles": [{ "value": "support-agent", "display": "Support Agent", "type": "direct" }],
"entitlements": [{ "value": "zendesk", "display": "Zendesk" }],
"groups": [
{ "value": "grp_01M3PSVED0M9RJTYH5AC72C253", "$ref": "https://ulexid.com/api/v1/scim/v2/Groups/grp_01M3PSVED0M9RJTYH5AC72C253", "display": "Support", "type": "direct" }
],
"urn:ietf:params:scim:schemas:extension:enterprise:2.0:User": {
"employeeNumber": "E-4417",
"costCenter": "CS-100",
"organization": "Customer Success",
"division": "Support",
"department": "Customer Success",
"manager": { "value": "usr_01M3PSV9GRT8GQGEG686AR1W9S", "$ref": "https://ulexid.com/api/v1/scim/v2/Users/usr_01M3PSV9GRT8GQGEG686AR1W9S", "displayName": "Dana Okafor" }
},
"meta": {
"resourceType": "User",
"created": "2026-09-29T14:47:03.000Z",
"lastModified": "2026-09-29T14:47:03.000Z",
"version": "W/\"v1.0\"",
"location": "https://ulexid.com/api/v1/scim/v2/Users/usr_01M3PSWBPGS08FWV4NV7P9VNFN"
}
}#Group
urn:ietf:params:scim:schemas:core:2.0:Group
| Attribute | Type | Mutability | Notes |
|---|---|---|---|
schemas | complex | readOnly | |
id | string | readOnly | the ulex grp_… id |
externalId | string | readWrite | becomes group.scim_id |
displayName | string | readWrite | required on POST. 1–120 characters |
members | complex, multi-valued | readWrite | value (the user id), $ref, display, type |
A ulex group always belongs to exactly one organization — the one the directory is bound to. POST /scim/v2/Groups creates the group there, with source: "scim". There is no way to move it, and no way to create a group in a different organization over SCIM.
The group slug is derived from displayName through connection.config.scim.group_name_template (default {name}), then slugified to ^[a-z0-9._:-]+$. Two groups in the same organization whose display names slugify identically collide on 409 uniqueness.
#Full example
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:Group"],
"id": "grp_01M3PSVED0M9RJTYH5AC72C253",
"externalId": "okta-g-9k2mB7yLt4N",
"displayName": "Support",
"members": [
{
"value": "usr_01M3PSWBPGS08FWV4NV7P9VNFN",
"$ref": "https://ulexid.com/api/v1/scim/v2/Users/usr_01M3PSWBPGS08FWV4NV7P9VNFN",
"display": "Pat Iyer",
"type": "direct"
},
{ "value": "usr_01M3PSWCNRG3H18C3A2AHBRYRZ", "display": "Sam Rivera", "type": "direct" }
],
"meta": {
"resourceType": "Group",
"created": "2026-09-29T14:49:02.000Z",
"lastModified": "2026-09-29T14:49:02.000Z",
"version": "W/\"v1.0\"",
"location": "https://ulexid.com/api/v1/scim/v2/Groups/grp_01M3PSVED0M9RJTYH5AC72C253"
}
}#PatchOp
urn:ietf:params:scim:api:messages:2.0:PatchOp
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{ "op": "replace", "path": "name.givenName", "value": "Patricia" },
{ "op": "replace", "path": "department", "value": "Customer Experience" },
{ "op": "add", "path": "roles", "value": [{ "value": "admin", "display": "Admin" }] },
{ "op": "remove", "path": "nickName" },
{ "op": "replace", "value": { "active": false } }
]
}op | path present | value present | Effect |
|---|---|---|---|
add | yes | yes | sets the attribute, or appends to an array |
add | no | yes | merges the value object's keys, each as an add |
replace | yes | yes | overwrites; identical to add for single-valued attributes |
replace | no | yes | same as add without a path |
remove | yes | no | clears the attribute |
remove | yes | yes | removes the matching array element |
remove | no | no | 400 noTarget |
| Path form | Supported |
|---|---|
department | yes |
name.givenName | yes, one level of nesting |
emails[type eq "work"].value | yes, value selector |
members[value eq "usr_…"] | yes, on /Groups |
urn:…:User:employeeNumber | yes, extension attributes |
emails.value (bare sub-attribute) | no — 400 invalidPath. Use the selector form |
Operations apply in order. A patch with five operations is not atomic across them: the first three may apply and the fourth may fail. Re-read meta.version before retrying.
#Bulk
urn:ietf:params:scim:api:messages:2.0:BulkRequest / …:BulkResponse
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkRequest"],
"failOnErrors": 1,
"Operations": [
{ "method": "POST", "path": "/Users", "bulkId": "alex", "version": "W/\"v1.0\"", "data": { "…": "…" } },
{ "method": "PATCH", "path": "/Users/usr_01M3PSWBPGS08FWV4NV7P9VNFN", "bulkId": "u2", "data": { "…": "…" } },
{ "method": "POST", "path": "/Groups", "bulkId": "g1", "data": { "members": [{ "value": "alex" }] } }
]
}| Rule | Value |
|---|---|
| Max operations | 100 |
| Max payload | 10,485,760 bytes |
method | POST, PUT, PATCH, DELETE |
path | /Users, /Users/{id}, /Groups, /Groups/{id} |
bulkId | required, unique in the request, 1–255 characters |
version | only on PUT/PATCH; an If-Match equivalent |
failOnErrors | 0 = run everything; ≥1 = abort after the Nth failure |
bulkId in members[].value | resolves to the created user. Must appear earlier in the request |
| Response status | always 200 for the call; per-operation status is in Operations[] |
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkResponse"],
"Operations": [
{ "method": "POST", "bulkId": "alex", "version": "W/\"v1.0\"", "location": "/Users/usr_01M3PSWCNRG3H18C3A2AHBRYRZ", "status": "201" },
{ "method": "POST", "bulkId": "g1", "version": "W/\"v1.0\"", "location": "/Groups/grp_01M3PSVED0M9RJTYH5AC72C253", "status": "201" },
{ "method": "POST", "bulkId": "robin", "status": "409", "response": { "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"], "status": "409", "scimType": "uniqueness", "detail": "A User with userName robin@acme.example already exists." } }
]
}status is a string in the response, per RFC 7644. An Operation with a non-2xx status and no response means ulex rejected it before a body could be built; treat it as a 500.
#ListResponse
urn:ietf:params:scim:api:messages:2.0:ListResponse
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 412,
"itemsPerPage": 50,
"startIndex": 51,
"Resources": []
}| Parameter | Default | Bounds |
|---|---|---|
startIndex | 1 | 1-based |
count | 20 | 1–200, clamped not errored |
filter | — | see below |
sortBy | — | one attribute |
sortOrder | ascending | ascending or descending |
Resources: [] with itemsPerPage: 0 means the end. totalResults counts everything matching the filter, not the page.
#Filter grammar
filter = orExp
orExp = andExp { "or" andExp }
andExp = notExp { "and" notExp }
notExp = "not" "(" filter ")" | "(" filter ")" | attrExp
attrExp = attrPath "pr" | attrPath compareOp compValue
attrPath = attrName { subAttr }
attrName = ALPHA *( ALPHA / DIGIT / "_" / "-" / "." )
compValue = false / null / true / number / string#Operators
| Operator | Meaning | Example |
|---|---|---|
eq | equals | userName eq "pat@acme.example" |
ne | not equals | department ne "Contractors" |
co | contains | userName co "acme" |
sw | starts with | userName sw "ext-" |
ew | ends with | userName ew "@globex.example" |
gt ge lt le | ordering | meta.created gt "2026-09-01T00:00:00Z" |
pr | present | title pr |
#Value selectors
emails[type eq "work"].value eq "pat@acme.example"
emails.value ew "@acme.example"
members[value eq "usr_01M3PSWBPGS08FWV4NV7P9VNFN"]#Constraints
| Constraint | Limit | On breach |
|---|---|---|
| Attribute paths per filter | 1 | 400 invalidFilter |
| Boolean operators | 4 | 400 invalidFilter |
| Parenthesis depth | 4 | 400 invalidFilter |
startIndex | ≥ 1 | 400 invalidValue |
Non-unique eq on a unique attribute | — | 400 tooMany |
| String comparison | case-insensitive | matches the RFC |
#Error
urn:ietf:params:scim:api:messages:2.0:Error
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
"status": "409",
"scimType": "uniqueness",
"detail": "A User with userName pat@acme.example already exists.",
"request_id": "req_01M3PSW9R0175NAW62NYR403R8"
}status | scimType | Cause | ulex code |
|---|---|---|---|
| 400 | invalidFilter | the filter is not valid SCIM filtering | scim_invalid_filter |
| 400 | tooMany | a unique attribute matched more than once | scim_invalid_filter |
| 400 | invalidSyntax | the body is not valid SCIM JSON | scim_invalid_syntax |
| 400 | invalidPath | the PATCH path does not exist | scim_invalid_syntax |
| 400 | invalidValue | a value failed its schema | validation_failed |
| 400 | noTarget | a PATCH remove with no path and no value | validation_failed |
| 400 | — | password was sent | validation_failed |
| 409 | uniqueness | userName, externalId or displayName collision | scim_conflict |
| 409 | mutability | an immutable attribute changed | scim_conflict |
| 404 | — | no such user or group | scim_user_not_found, scim_group_not_found |
| 412 | mutability | stale If-Match | scim_conflict |
| 413 | — | over 100 bulk operations, or over 10 MiB | scim_bulk_exceeded |
| 429 | — | over 3,000 requests/minute | rate_limit_error |
| 500 | — | our fault | internal_error |
| 503 | — | deploying or draining | service_unavailable |
scimType is omitted rather than guessed when the failure does not map cleanly. Do not branch on its presence; branch on status and read detail.
request_id is in the body and in the x-ulex-request-id response header, and it is on the audit event for the request.