Configure SCIM user and group provisioning
SoloDB provides SCIM 2.0 endpoints for identity providers and other provisioning clients to create and maintain users, organisation groups and group memberships. Each provisioning connection has its own base URL and bearer credential. It can access only the users and groups assigned to that connection.
SCIM provisions identity data. Configure Microsoft or another authentication method separately for sign-in. The Entra delegated API token exchange described in Entra delegated API access remains a separate integration with separate credentials.
The protocol uses the SCIM core and enterprise User schemas and the Group schema. The reference specifications are RFC 7643 and RFC 7644. The scim.dev implementation checklist provides a practical guide to interoperability testing.
Deploy the database changes
Apply data/migration/onelab-442-scim-and-entra-token.sql once to every database deploying this version, before deploying the PHP code. The migration adds connection ownership, external identifiers and SCIM profile data to existing user and organisation group tables, plus provisioning settings to the existing OAuth2 Service table. Existing records remain outside SCIM management until explicitly assigned to a connection.
Use the host profile matching the installation for the subsequent schema check. For SoloDB:
Refresh Doctrine proxies and the application configuration cache through the normal deployment procedure. Credentials and connection settings are database records; no provisioning secrets belong in host configuration files.
Create a provisioning connection
As a SoloDB administrator:
Configure an active Authentication method for the provisioned users. Choose the existing Microsoft or other OAuth2 method if they should sign in through that provider. A database authentication method is also possible, but SCIM does not supply local passwords; password setup must use SoloDB's normal administrative workflow.
Under Admin → OAuth2 → Scopes, create a non-default scope with the value
SCIM.Provision. This record supplies the Service form's scope association; it does not grant access through the ordinary OAuth token endpoint.Generate a random 64-character hexadecimal bearer token, for example:
openssl rand -hex 32Under Admin → OAuth2 → Services, create a service of type SCIM provisioning. Enter a descriptive name and paste the token in Client secret. Select the
SCIM.Provisionscope and the Authentication method configured in step 1. Enable SCIM provisioning.Record the Service ID shown in the service URL. A service with ID
42onhttps://solodb.examplehas this SCIM base URL:https://solodb.example/scim/v2/42
The bearer token is stored as a password hash, so it cannot be recovered from SoloDB later. Keep its original value in the provisioning client's protected credential store. Use the Service's Update client secret action to rotate it; the old credential stops working immediately after the update. Disabling the service pauses provisioning without changing its users' activation status.
Keep the selected Authentication method active. A SCIM service must not itself be selected as a sign-in provider. SCIM-created users receive the ordinary SoloDB user role. Provisioning does not grant administrator roles, access permits, group roles or environments.
Connect Microsoft Entra provisioning
Create or select the Enterprise application representing the SoloDB provisioning integration. In Provisioning, choose automatic provisioning and enter the SoloDB SCIM base URL as Tenant URL and the generated token as Secret Token. Test the connection before enabling provisioning. Configure user and group mappings and start with a small assigned test population. The scim.dev Entra guide describes these controls.
Map userName to a stable, unique username, normally the user's principal name, and externalId to the source's stable identifier. Include name.givenName, name.familyName, a work email and active. Configure group mapping for displayName, externalId and members. Group members must reference the SoloDB SCIM User ID returned when that user was provisioned, rather than the Entra object ID or email address.
SCIM id and externalId have different purposes: SoloDB assigns id; the client supplies externalId. External IDs are case-sensitive and unique within each connection and resource type. Usernames, principal names, primary email addresses and organisation group names must also satisfy SoloDB's existing global uniqueness constraints.
Discover supported capabilities
Send the bearer token in the Authorization header of every request:
Endpoint beneath the base URL | Supported operations |
|---|---|
| GET collection, POST create |
| GET, PUT replace, PATCH, DELETE |
| POST search |
| GET collection, POST create |
| GET, PUT replace, PATCH, DELETE |
| POST search |
| GET capabilities |
| GET supported resource definitions |
| GET supported attributes |
Responses use application/scim+json. Requests with a JSON body may use that content type or application/json. User and group endpoints support filtering, sorting, attribute selection, pagination and conditional requests using ETags. Bulk operations, password provisioning and nested group membership are unsupported and are not advertised as available capabilities. Normal SoloDB API tokens do not authenticate this endpoint, and the SCIM credential does not authenticate ordinary API or browser requests.
Map user and group attributes
SCIM attribute | SoloDB behavior |
|---|---|
| Maps to username; an email-shaped value also supplies the user principal name |
| Map to first and last name |
| Retains the supported email attributes; primary email, or the first email, maps to SoloDB's email field |
| Activates or deactivates the account; defaults to true |
| Maps to the profile's job title |
Enterprise | Map to company name, department and personnel number |
Enterprise | References a User in the same connection; the response supplies its reference and display name |
Other advertised profile attributes | Retained in the SCIM profile document |
User | Derived from direct SCIM group memberships and read-only |
Group | Maps to the organisation group name |
Group | Maps to organisation group user memberships; only Users from the same connection are allowed |
When emails is omitted, SoloDB uses an internal address ending in @invalid to satisfy its database requirement. This placeholder is not added to the SCIM emails response. Supply a real email for normal user communication.
Changing group memberships does not change the user's administrator roles. Repeatedly adding an existing member does not create duplicate memberships. Removing a group member leaves the user account intact. A filtered PATCH removal that matches no member returns noTarget; clients can read the current membership before retrying that removal.
Create and update resources
Example user creation:
A successful create returns 201, the complete SCIM resource, a Location header and an ETag. The returned id is the value to use in later user URLs and group memberships. Supplied resource IDs and read-only metadata do not override server-generated values.
To deactivate a user:
To add that user to a group, PATCH the group with:
To remove the membership, use op: "remove" with the path members[value eq "123"]. A PATCH request containing several operations is atomic: a failed operation rolls back the whole request. PUT replaces the writable resource attributes, so omitted optional attributes are removed or reset to their defaults.
Find resources and avoid stale updates
Examples of supported queries:
URL-encode filter expressions in HTTP requests. Filters support logical composition, grouping, presence checks, comparisons and value paths. Attribute names are case-insensitive; identifier comparisons follow the advertised schema's case rules.
Collections return the SCIM ListResponse with Resources, totalResults, startIndex and itemsPerPage. Indices start at 1. The default page contains up to 100 resources, with a maximum of 200. count=0 returns the total without resource data. Filtering and sorting apply to the connection's managed population before pagination; size the service for that population and verify response times during rollout.
Use attributes to select attributes or excludedAttributes to omit them. The mandatory id and schemas fields remain in resource responses. For updates, send the latest ETag in If-Match; a stale version receives 412. Conditional GET using a matching If-None-Match returns 304 without a body.
Deactivation, deletion and existing accounts
Setting active to false leaves the SCIM resource available for reconciliation and later reactivation. It blocks sign-in and API access, removes browser sessions and refresh credentials, and records a token cutoff so tokens issued before deactivation stay invalid after reactivation. Microsoft and generic OAuth sign-in do not overwrite the managed profile or reactivate an account disabled by SCIM.
Deactivation preserves group memberships in SCIM so the provisioning client can still reconcile them. SoloDB's normal membership checks exclude inactive users from access. Remove memberships through the Group endpoint when required; removed memberships stay removed after the user is reactivated.
DELETE returns 204 and removes the resource from subsequent SCIM reads and search results. SoloDB retains the record for historical references, deactivates its SCIM memberships and releases the provisioning external ID and login name for recreation. A recreated resource receives a new server ID.
Existing local users and groups are not automatically adopted by matching an email, username or display name. A collision returns 409. Plan adoption with a SoloDB administrator before enabling provisioning: assign the intended existing records to the SCIM Service through an audited database migration, preserve their IDs, and align their authentication method and matching identifiers. A connection cannot take ownership of another connection's resources. Services owning provisioning history cannot be deleted; disable them when retiring an integration.
Validate the client integration
Run SCIM Verify against a disposable installation or staging database using its base URL and credential. The verifier can create, update and delete resources, so use a dedicated test connection. The checks described in the SCIM implementation checklist are useful for the final rollout: discovery, creation, matching, updates, deactivation, group membership and retries.
HTTP status | SCIM meaning |
|---|---|
400 | Invalid data, filter, schema or PATCH target; |
401 | Incorrect or revoked credential, disabled connection or inactive Authentication method |
404 | Unsupported endpoint, missing resource or resource outside this connection |
409 | Username, email, group name or external ID conflicts with an existing record |
412 | The supplied resource version is stale |
415 | Unsupported request content type |
503 | Provisioning storage or required local configuration is unavailable |
Errors use the SCIM Error schema and a string status, rather than the ordinary API problem format. Keep bearer tokens, passwords and complete profile payloads out of logs. Verify both successful and refused cross-connection operations, and confirm that a disabled user cannot regain access through an old token or browser session.