API reference
SCIM 2.0 provisioning
Your identity provider keeps Luceryn's people and groups in step with your directory: it creates, renames and deactivates people, and pushes groups and their members. The request forms handled are the ones Microsoft Entra ID and Okta send.
The basics
| Item | Detail |
|---|---|
| Direction | Into Luceryn. The identity provider calls; Luceryn never calls the directory. |
| Protocol | SCIM 2.0 (RFC 7643 and RFC 7644) over HTTPS. |
| Base address | /api/scim/v2 |
| Format | Answers are application/scim+json. Request bodies are read as JSON whatever Content-Type is sent. |
| Resources | User always. Group while the workspace's Groups switch is on (Admin, Industry and features; off by default). |
| Dependencies | An identity provider that speaks SCIM 2.0. No middleware. |
Authentication
Send the provisioning token as Authorization: Bearer scim_.... The token decides the workspace. Every path needs it, the discovery documents included.
- Issued under Admin, SSO, in the SCIM provisioning panel, by a person who holds Manage organization.
- Shown once. Luceryn keeps its SHA-256 hash and its last four characters, and shows when it was last used.
- One token for a workspace. Rotate token issues a new one and the old one stops working at once.
- Pause SCIM refuses every request with 401 until it is resumed; the token is kept.
Discovery documents
| Method | Path | What it does | Success |
|---|---|---|---|
| GET | /api/scim/v2/ServiceProviderConfig | What the service supports: PATCH yes, bulk no, filter yes (at most 200 results), change password no, sort no, ETag no, bearer token authentication. | 200 |
| GET | /api/scim/v2/ResourceTypes | The resource types: User always, Group only while the workspace's Groups switch is on. | 200 |
| GET | /api/scim/v2/ResourceTypes/{id} | One resource type (User or Group). | 200 |
| GET | /api/scim/v2/Schemas | The attributes Luceryn keeps for User and, while Groups is on, for Group. | 200 |
| GET | /api/scim/v2/Schemas/{id} | One schema by its URN. | 200 |
Users
| Method | Path | What it does | Success |
|---|---|---|---|
| GET | /api/scim/v2/Users | List the workspace's people, oldest first. Outside collaborators are never listed. | 200 |
| POST | /api/scim/v2/Users | Create a person in the workspace with the workspace's default role. No invitation email is sent. | 201 |
| GET | /api/scim/v2/Users/{id} | Read one person. | 200 |
| PUT | /api/scim/v2/Users/{id} | Replace: the name and the active flag are applied; everything else in the body is ignored. | 200 |
| PATCH | /api/scim/v2/Users/{id} | Change the name or the active flag (see the PATCH table). | 200 |
| DELETE | /api/scim/v2/Users/{id} | Deactivate the person: sign-in is blocked and the work history is kept. Nothing is ever hard deleted through SCIM. | 204 |
Attributes read from a request
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
userName | string | Yes | The person's work email address. Must contain an @. Stored in lower case. Read on create only: it cannot be changed through SCIM afterwards. | sam.rivera@example.edu |
name.formatted | string | No | The full name. Used first when present. | Sam Rivera |
name.givenName, name.familyName | string | No | Joined with a space to make the full name when name.formatted is absent. | Sam, Rivera |
displayName | string | No | Used as the full name when name carries nothing. With no name at all, the part of the email before the @ is used. | Sam Rivera |
active | boolean | No | false creates the person deactivated, or deactivates them: sign-in is blocked, history is kept. true reactivates. Default true. | true |
A person created through SCIM gets the provisioning default role, pm (project manager). Roles are not pushed from the directory and there is no screen to change that default: set a person's role in Luceryn, under Members and roles, after they are created.
Attributes ignored
These are accepted in a request and not stored or acted on. Sending them is not an error.
- externalId (not stored for users; match people on userName)
- emails (the address is taken from userName)
- password
- title, phoneNumbers, addresses, photos, locale, timezone, preferredLanguage, nickName, userType
- roles, entitlements and groups (roles are set in Luceryn; group membership is changed through /Groups)
- the enterprise user extension (employeeNumber, department, manager and the rest)
Attributes returned
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
schemas | array of string | Yes | urn:ietf:params:scim:schemas:core:2.0:User. | |
id | string (UUID) | Yes | Luceryn's id for the person. Use it in /Users/{id} and as a group member value. | 7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22 |
userName | string | Yes | The email address. | sam.rivera@example.edu |
name | object | Yes | formatted is the full name; givenName is its first word and familyName the rest. | |
displayName | string | Yes | The full name, or the email address when there is no name. | Sam Rivera |
emails | array | Yes | One entry: the email address, primary, type work. | |
active | boolean | Yes | false for a deactivated person. | true |
meta | object | Yes | resourceType User, created, and location (the address of the resource). |
PATCH on a user
| op | path | value | Effect |
|---|---|---|---|
replace | active | true or false (a boolean, or the text "True" or "False") | Activates or deactivates the person. |
replace | (none) | { "active": false } | The same, in the form Microsoft Entra ID sends. |
replace | (none) | { "displayName": "..." } or { "name": { "formatted": "..." } } or { "name": { "givenName": "...", "familyName": "..." } } | Sets the full name. |
replace | displayName | a string | Sets the full name. |
replace | name.formatted | a string | Sets the full name. |
- add is treated the same as replace. remove operations are ignored.
- Any path that starts with name and carries a string sets the WHOLE name to that string. Send the full name in name.formatted or displayName; a provider that sends name.givenName and name.familyName as two separate operations leaves only the last one as the person's name.
- Every other path is ignored and the answer is still 200 with the person as they now stand.
- The body must name the PatchOp schema in schemas and carry an Operations array.
Map the full name, not its parts, for updates
In Microsoft Entra ID, map a single attribute to displayName or name.formatted for updates. If given name and family name are sent as two separate PATCH operations, the person's name in Luceryn becomes the value of the last operation only.
Who cannot be changed
- A workspace owner or a platform administrator cannot be activated or deactivated through SCIM (403).
- Outside collaborators are not directory users: they are never listed, read, renamed or deactivated through SCIM.
- Nobody is hard deleted. DELETE and active false both deactivate: sign-in is blocked and the person's work history stays.
Groups
Available while the Groups switch is on. The directory decides a group's name and members; Luceryn decides what the group can reach (project access is given in Luceryn and is never written through SCIM). Only groups created through SCIM are visible to it; a group made in Luceryn is never listed or changed.
| Method | Path | What it does | Success |
|---|---|---|---|
| GET | /api/scim/v2/Groups | List the groups this connection manages, oldest first. Groups made in Luceryn are never listed. | 200 |
| POST | /api/scim/v2/Groups | Create a group, with members when the body carries them. | 201 with a Location header |
| GET | /api/scim/v2/Groups/{id} | Read one group with its members. | 200 |
| PUT | /api/scim/v2/Groups/{id} | Replace the name, and the external id and member list when the body carries them. An absent externalId or members is kept, not cleared. | 200 |
| PATCH | /api/scim/v2/Groups/{id} | Add, remove or replace members; rename; set the external id (see the PATCH table). | 204, no body |
| DELETE | /api/scim/v2/Groups/{id} | Delete the group. Its access to every project is removed first and noted in each project's activity. | 204 |
Attributes
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
displayName | string | Yes | The group's name, at most 120 characters. Unique in the workspace without regard to capitals, across groups made in Luceryn too. | Capital projects |
externalId | string | No | The directory's own id for the group, at most 255 characters. Unique in the workspace. | 0b6f2c1e-1111-4222-8333-444455556666 |
members | array of { value } | No | value is a Luceryn user id (the id returned by /Users). Returned with display (the person's name), type User and $ref. | [{ "value": "7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22" }] |
id | string (UUID) | No | Set by Luceryn. Returned, never read from a request. | 3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d |
meta | object | No | Returned: resourceType Group, created, lastModified, location. |
PATCH on a group
| op | path | value | Effect |
|---|---|---|---|
add | members | [{ "value": "<user id>" }] | Adds the members. |
remove | members | [{ "value": "<user id>" }] | Removes those members (the form Microsoft Entra ID sends). |
remove | members[value eq "<user id>"] | (none) | Removes that member (the form Okta sends). Several ids may be joined with or. |
remove | members | (none) | Removes every member. |
replace | members | [{ "value": "<user id>" }, ...] | Sets the member list to exactly these. |
replace | displayName | a string | Renames the group. |
replace | externalId | a string | Sets the directory's own id for the group. remove on externalId clears it. |
replace | (none) | { "displayName": "...", "externalId": "...", "members": [...] } | Any of the three at once. With add, members are added; with replace, the member list is replaced. |
- Operation names are not case sensitive. A path may carry the Group schema URN in front.
- A member value may be written as { "value": "id" }, a list of those, a bare id or a list of bare ids.
- A path for an attribute Luceryn does not keep (for example meta or id) is ignored.
- At most 5,000 member ids may be named in one PATCH request.
- A member is accepted only when the value is the id of a person in this workspace who is not an outside collaborator. Any other value is left out without an error and counted in the admin audit log entry.
Lists, filters and paging
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
filter | string | No | One of the filters in the table below. Any other filter is refused with 400. | userName eq "sam.rivera@example.edu" |
startIndex | integer | No | 1-based position of the first result. Default 1. | 1 |
count | integer | No | Results in the page. Default 100, at most 200. On Groups, 0 returns the total only. | 100 |
excludedAttributes | string | No | Groups only: members leaves the member lists out of the answer. | members |
attributes | string | No | Groups only: when given without members, the member lists are left out. No other attribute selection is applied. | displayName |
| Resource | Filter | Note |
|---|---|---|
| Users | userName eq "sam.rivera@example.edu" | The only filter on Users. Capitals in the address do not matter. |
| Groups | displayName eq "Capital projects" | Capitals do not matter. |
| Groups | externalId eq "0b6f2c1e-1111-4222-8333-444455556666" | Exact match. |
| Groups | id eq "7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22" | Exact match on Luceryn's id. |
A list answer is a SCIM ListResponse with totalResults, itemsPerPage, startIndex and Resources. Results come oldest first; sorting is not supported.
Errors
Every error is a SCIM Error message: schemas, status (the HTTP status as text), detail (the message below) and, on group errors, scimType.
| Status | Message | When |
|---|---|---|
401 | Invalid or missing bearer token. | No Authorization header, an unknown token, or provisioning is paused for the workspace. Every path answers this, the discovery documents included. |
400 | Unsupported filter: <filter>. Only 'userName eq "value"' is supported. | Any other filter on /Users. |
400 | Invalid JSON body. | The body does not parse as JSON. |
400 | userName must be the user's email address. | POST /Users without a userName, or one with no @. |
400 | Expected a SCIM PatchOp body. | PATCH /Users/{id} without the PatchOp schema or without an Operations array. |
403 | This account is workspace-owner tier and can't be managed via SCIM. | An attempt to activate or deactivate a workspace owner or a platform administrator. |
404 | User not found. | No such person in this workspace, or the id belongs to an outside collaborator. |
409 | User <email> already exists (id <id>). | POST /Users for an address already in this workspace. |
409 | User <email> already exists. | POST /Users for an address that already has a Luceryn account elsewhere. |
500 | Couldn't create the user. | The account could not be created. |
500 | User was created but the profile row hasn't materialized - retry the read. | The account was created but could not be read back yet. Read /Users with the userName filter. |
405 | <METHOD> not supported on /Users. | A method other than GET or POST on /Users (and likewise on /Users/{id}, /Groups and /Groups/{id}). |
404 | Unknown SCIM resource: /<path> | Any other path under /api/scim/v2. |
403 | Groups are switched off for this Luceryn workspace, so group push is refused. A Luceryn administrator can switch on Groups under Admin, Industry and features. User provisioning is not affected. | Any request to /Groups while the workspace's Groups switch is off. |
400 | Unsupported filter: <filter>. Use displayName eq "name", externalId eq "id" or id eq "id". | Any other filter on /Groups. scimType invalidFilter. |
400 | displayName: Give the group a name. | POST or rename with an empty displayName. scimType invalidValue. |
400 | displayName: Keep the group name under 120 characters. | A name longer than 120 characters. scimType invalidValue. |
400 | displayName is required. | PUT /Groups/{id} without a displayName. scimType invalidValue. |
400 | externalId is longer than 255 characters. | scimType invalidValue. |
400 | Expected a SCIM PatchOp body (schemas must include the PatchOp schema, with an Operations list). | PATCH /Groups/{id} with any other body. scimType invalidSyntax. |
400 | Unsupported PATCH op: <op>. Use add, remove or replace. | scimType invalidSyntax. |
400 | A remove operation needs a path. | scimType noTarget. |
400 | A member filter path is only supported with remove: <path> | add or replace with a members[...] path. scimType invalidPath. |
400 | Unsupported member filter: <path>. Use members[value eq "id"]. | scimType invalidFilter. |
400 | displayName is required and cannot be removed. | remove on displayName. scimType mutability. |
400 | Too many members in one request (at most 5000). | scimType invalidValue. |
404 | Group not found. | No such group, or the group was made in Luceryn and is not managed by this connection. scimType noTarget. |
409 | A group called <name> already exists (id <id>). | Another group pushed by the directory has the name. scimType uniqueness. |
409 | A group called <name> was made in Luceryn and is managed there. Rename the Luceryn group under Admin, Groups, or give the directory group another name. | A group made in Luceryn has the name. scimType uniqueness. |
409 | A group with externalId <id> already exists (id <id>). | scimType uniqueness. |
500 | The group was created but its members could not be saved. Send the members again with PATCH. | POST /Groups created the group and the member write failed. |
500 | Could not save the group. | A write failed. Sending the same request again is safe. |
An unknown id under /ResourceTypes or /Schemas answers 404. Other 500 answers on groups name the step that failed (reading the groups, saving the members, removing project access, deleting the group); 500 answers on users carry the database's message.
HTTP/1.1 409 Conflict
Content-Type: application/scim+json
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
"status": "409",
"detail": "User sam.rivera@example.edu already exists (id 7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22)."
}Limits
- Page size: default 100, at most 200 (also published as filter.maxResults in /ServiceProviderConfig).
- Group PATCH: at most 5,000 member ids in one request.
- Time: one request may run for up to 30 seconds.
- Not supported: bulk operations, sorting, ETags, changing a password, /Me, /.search, and filters other than those listed.
- No request rate limit is applied by Luceryn on this interface.
- One provisioning token per workspace.
Examples
curl -X POST "https://luceryn.example.com/api/scim/v2/Users" \
-H "Authorization: Bearer scim_EXAMPLE_TOKEN_REPLACE_ME" \
-H "Content-Type: application/scim+json" \
-d '{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "sam.rivera@example.edu",
"name": { "givenName": "Sam", "familyName": "Rivera" },
"active": true
}'HTTP/1.1 201 Created
Content-Type: application/scim+json
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": "7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22",
"userName": "sam.rivera@example.edu",
"name": { "formatted": "Sam Rivera", "givenName": "Sam", "familyName": "Rivera" },
"displayName": "Sam Rivera",
"emails": [{ "value": "sam.rivera@example.edu", "primary": true, "type": "work" }],
"active": true,
"meta": {
"resourceType": "User",
"created": "2026-11-20T15:04:05.000Z",
"location": "https://luceryn.example.com/api/scim/v2/Users/7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22"
}
}curl -X PATCH "https://luceryn.example.com/api/scim/v2/Groups/3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d" \
-H "Authorization: Bearer scim_EXAMPLE_TOKEN_REPLACE_ME" \
-H "Content-Type: application/scim+json" \
-d '{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"],
"Operations": [
{ "op": "add", "path": "members", "value": [{ "value": "7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22" }] }
]
}'HTTP/1.1 204 No ContentA question about an interface?
These pages are written from the code that serves each interface. If something here does not match what you see, tell us and we will check it.
hello@luceryn.com