Provisioning (SCIM)
Your customers' identity providers (Okta, Entra ID, Google Workspace, JumpCloud) can manage their people in Nod themselves: create them when they join, update them, deactivate them when they leave. Nod speaks SCIM 2.0 (RFC 7643, RFC 7644) for this.
Setting it up
Make a token for the identity provider, tied to the customer's organization if they have one:
nod scim token acme --organization initech --label "Initech's Okta"
# SCIM token 01J… for acme, organization initech (shown once, store it now): scim_…
In the identity provider's provisioning settings, enter:
- Base URL:
<issuer>/scim/v2, for examplehttps://auth.example.com/acme/scim/v2 - Authentication: bearer token (Okta calls it "HTTP Header", Entra "Secret Token"): the
scim_…value - Unique identifier:
userName
What it does
| The identity provider | Nod |
|---|---|
Looks a person up (filter=userName eq "…" or externalId eq "…") | Finds them by username or the provider's own id |
| Creates them | A user with that username, name, email and externalId. With an organization's token, a member of it |
| Updates them (PUT, or PATCH in Okta's or Entra's style) | Changes username, display name, name, email or externalId. A changed email becomes unverified |
Deactivates them (active: false) | Blocks them: no sign-in, every grant revoked, sessions stop |
| Reactivates them | Unblocks them |
| Deletes them | Deletes them, after revoking their grants |
- A token tied to an organization sees only that organization's members. Users it creates join the organization, and everyone else in the realm is invisible to it, including in lookups.
- Every change is in the security log as
scim.change, underscim:<token id>. - Tokens are 256 random bits, stored only as a hash.
nod scim tokens acmelists them, andnod scim revoke acme <id>stops one at once. - Errors come in SCIM's own format:
uniquenessfor a taken username,invalidFilterandinvalidPathfor what Nod doesn't support.
Groups
The identity provider can push its groups too (Okta's "Push Groups", Entra ID's group provisioning). Each group becomes a role named scim:<group id>, with the group's name as its description, and its members hold that role. You decide what the group allows, by giving its role permissions as you would any role:
curl -X PUT "$ISSUER/api/v1/roles/scim:01jd…/permissions" -H "Authorization: Bearer $MGMT" \
-d '{"resource": "https://invoices.example", "scopes": ["invoices:read"]}'
| The identity provider | Nod |
|---|---|
Looks a group up (filter=displayName eq "…") | Finds the token's group of that name (names are unique per token, any case) |
| Creates it, with or without members | A new role; each member holds it |
| Adds or removes members (PATCH in Okta's or Entra's style, or PUT) | They gain or lose the role, and the permissions it carries, at their next token |
| Renames it | The role's description changes; its name, and so its permissions, stay |
| Deletes it | Nobody holds the role, and it is deleted |
- The directory decides who is in a group. The management API can't assign a group's role to anyone, and setting someone's roles in an organization leaves their groups as they are.
- A token sees only the groups it made. An organization's token makes groups held in that organization (they count only in tokens for it), and only its members can join them. Roles you made yourself are never groups.
- Every change is all or none: a PATCH naming one unknown member changes nothing.
Bulk
POST /scim/v2/Bulk (RFC 7644 §3.7) takes up to 100 operations on Users and Groups (1 MB), and runs them in order, each exactly as if it had been sent alone: the same token, the same checks, the same answers. An operation can name what an earlier one created by its bulkId, for example a new user as a new group's member:
{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:BulkRequest"], "failOnErrors": 1, "Operations": [
{ "method": "POST", "path": "/Users", "bulkId": "u1", "data": { "userName": "alice" } },
{ "method": "POST", "path": "/Groups", "data": { "displayName": "Finance", "members": [{ "value": "bulkId:u1" }] } } ] }
Operations aren't one transaction: each succeeds or fails by itself, with its own status (and response when it failed). failOnErrors stops the rest after that many failures. A bulkId that no earlier operation created is a 409 for that operation.
Not supported: sorting, and filters other than userName eq, externalId eq and displayName eq.