Skip to content

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

SCIM basics
ItemDetail
DirectionInto Luceryn. The identity provider calls; Luceryn never calls the directory.
ProtocolSCIM 2.0 (RFC 7643 and RFC 7644) over HTTPS.
Base address/api/scim/v2
FormatAnswers are application/scim+json. Request bodies are read as JSON whatever Content-Type is sent.
ResourcesUser always. Group while the workspace's Groups switch is on (Admin, Industry and features; off by default).
DependenciesAn 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

SCIM discovery operations
MethodPathWhat it doesSuccess
GET/api/scim/v2/ServiceProviderConfigWhat 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/ResourceTypesThe 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/SchemasThe 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

SCIM user operations
MethodPathWhat it doesSuccess
GET/api/scim/v2/UsersList the workspace's people, oldest first. Outside collaborators are never listed.200
POST/api/scim/v2/UsersCreate 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

SCIM user attributes read
FieldTypeRequiredDescriptionExample
userNamestringYesThe 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.formattedstringNoThe full name. Used first when present.Sam Rivera
name.givenName, name.familyNamestringNoJoined with a space to make the full name when name.formatted is absent.Sam, Rivera
displayNamestringNoUsed as the full name when name carries nothing. With no name at all, the part of the email before the @ is used.Sam Rivera
activebooleanNofalse 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

SCIM user attributes returned
FieldTypeRequiredDescriptionExample
schemasarray of stringYesurn:ietf:params:scim:schemas:core:2.0:User.
idstring (UUID)YesLuceryn's id for the person. Use it in /Users/{id} and as a group member value.7d2f1c5e-8a41-4a0e-9a57-2f0f6f0b1c22
userNamestringYesThe email address.sam.rivera@example.edu
nameobjectYesformatted is the full name; givenName is its first word and familyName the rest.
displayNamestringYesThe full name, or the email address when there is no name.Sam Rivera
emailsarrayYesOne entry: the email address, primary, type work.
activebooleanYesfalse for a deactivated person.true
metaobjectYesresourceType User, created, and location (the address of the resource).

PATCH on a user

SCIM user PATCH forms
oppathvalueEffect
replaceactivetrue 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.
replacedisplayNamea stringSets the full name.
replacename.formatteda stringSets 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.

SCIM group operations
MethodPathWhat it doesSuccess
GET/api/scim/v2/GroupsList the groups this connection manages, oldest first. Groups made in Luceryn are never listed.200
POST/api/scim/v2/GroupsCreate 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

SCIM group attributes
FieldTypeRequiredDescriptionExample
displayNamestringYesThe group's name, at most 120 characters. Unique in the workspace without regard to capitals, across groups made in Luceryn too.Capital projects
externalIdstringNoThe directory's own id for the group, at most 255 characters. Unique in the workspace.0b6f2c1e-1111-4222-8333-444455556666
membersarray of { value }Novalue 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" }]
idstring (UUID)NoSet by Luceryn. Returned, never read from a request.3f1b2c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d
metaobjectNoReturned: resourceType Group, created, lastModified, location.

PATCH on a group

SCIM group PATCH forms
oppathvalueEffect
addmembers[{ "value": "<user id>" }]Adds the members.
removemembers[{ "value": "<user id>" }]Removes those members (the form Microsoft Entra ID sends).
removemembers[value eq "<user id>"](none)Removes that member (the form Okta sends). Several ids may be joined with or.
removemembers(none)Removes every member.
replacemembers[{ "value": "<user id>" }, ...]Sets the member list to exactly these.
replacedisplayNamea stringRenames the group.
replaceexternalIda stringSets 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

SCIM list parameters
FieldTypeRequiredDescriptionExample
filterstringNoOne of the filters in the table below. Any other filter is refused with 400.userName eq "sam.rivera@example.edu"
startIndexintegerNo1-based position of the first result. Default 1.1
countintegerNoResults in the page. Default 100, at most 200. On Groups, 0 returns the total only.100
excludedAttributesstringNoGroups only: members leaves the member lists out of the answer.members
attributesstringNoGroups only: when given without members, the member lists are left out. No other attribute selection is applied.displayName
SCIM filters supported
ResourceFilterNote
UsersuserName eq "sam.rivera@example.edu"The only filter on Users. Capitals in the address do not matter.
GroupsdisplayName eq "Capital projects"Capitals do not matter.
GroupsexternalId eq "0b6f2c1e-1111-4222-8333-444455556666"Exact match.
Groupsid 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.

SCIM errors
StatusMessageWhen
401Invalid 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.
400Unsupported filter: <filter>. Only 'userName eq "value"' is supported.Any other filter on /Users.
400Invalid JSON body.The body does not parse as JSON.
400userName must be the user's email address.POST /Users without a userName, or one with no @.
400Expected a SCIM PatchOp body.PATCH /Users/{id} without the PatchOp schema or without an Operations array.
403This 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.
404User not found.No such person in this workspace, or the id belongs to an outside collaborator.
409User <email> already exists (id <id>).POST /Users for an address already in this workspace.
409User <email> already exists.POST /Users for an address that already has a Luceryn account elsewhere.
500Couldn't create the user.The account could not be created.
500User 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}).
404Unknown SCIM resource: /<path>Any other path under /api/scim/v2.
403Groups 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.
400Unsupported filter: <filter>. Use displayName eq "name", externalId eq "id" or id eq "id".Any other filter on /Groups. scimType invalidFilter.
400displayName: Give the group a name.POST or rename with an empty displayName. scimType invalidValue.
400displayName: Keep the group name under 120 characters.A name longer than 120 characters. scimType invalidValue.
400displayName is required.PUT /Groups/{id} without a displayName. scimType invalidValue.
400externalId is longer than 255 characters.scimType invalidValue.
400Expected a SCIM PatchOp body (schemas must include the PatchOp schema, with an Operations list).PATCH /Groups/{id} with any other body. scimType invalidSyntax.
400Unsupported PATCH op: <op>. Use add, remove or replace.scimType invalidSyntax.
400A remove operation needs a path.scimType noTarget.
400A member filter path is only supported with remove: <path>add or replace with a members[...] path. scimType invalidPath.
400Unsupported member filter: <path>. Use members[value eq "id"].scimType invalidFilter.
400displayName is required and cannot be removed.remove on displayName. scimType mutability.
400Too many members in one request (at most 5000).scimType invalidValue.
404Group not found.No such group, or the group was made in Luceryn and is not managed by this connection. scimType noTarget.
409A group called <name> already exists (id <id>).Another group pushed by the directory has the name. scimType uniqueness.
409A 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.
409A group with externalId <id> already exists (id <id>).scimType uniqueness.
500The 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.
500Could 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.

Example error
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

Create a user: request
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
  }'
Create a user: answer
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"
  }
}
Add a member to a group: request
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" }] }
    ]
  }'
Add a member to a group: answer
HTTP/1.1 204 No Content

A 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