Documentation base URLs use placeholder https://{your-tenant}.sso.id. Log in to show your tenant or custom domain.
Log in for Your Tenant URL
Chapter 4 — Centralized Identity Directory

User Directory, Invitations & Live Session Control

Manage every employee, B2B customer user, and consumer identity from a single command center ( /user-management). Create or invite users, assign Application Roles, inspect login history, verify Tenant Ownership, and remotely revoke compromised browser/mobile sessions in real time.

Incident Response Story: The Stolen Airport Laptop

How CloudPulse Contained a Compromised Executive Session in 8 Seconds

At 6:45 PM on a Friday, CloudPulse's VP of Finance reported that her unlocked laptop was stolen at an airport lounge with active browser sessions open to the billing dashboard.

Instead of rotating tenant-wide signing keys and logging out 40,000 innocent customers, CloudPulse's security engineer opened /user-management, clicked the VP's user profile, opened the Active Sessions tab (GET /api/users/{userId}/sessions), and clicked Revoke All Sessions (DELETE /api/users/{userId}/sessions/revoke-all). Within milliseconds, every refresh token and active session for that user was invalidated across all applications.

1. Onboarding Users: Direct Creation vs. Email Invitations

In /user-management, administrators have two ways to add users manually (alongside automated JIT Federation and SCIM 2.0):

A. Send Email Invitation (POST /api/users/invite)

Enter the user's Email, First Name, Last Name, and pre-assign their Roles/Groups. SSO.ID dispatches a branded invitation email (customizable in /settings → Email Templates) with a one-time cryptographic token so the user sets their own password and MFA. Pending invites can be resent anytime via POST /api/users/{userId}/resend-invite.

B. Direct User Creation (POST /api/users)

Create an active user account immediately with a specified initial password, phone number, and verified status — ideal for automated migration scripts, QA environments, or service desk provisioning.

Flow Diagram User Lifecycle & Active Session Control Flow
flowchart LR ONB["Onboard: Invite / Create / JIT / SCIM"] --> ACT["Active Directory User"] ACT --> ROLES["Assign App Roles, Groups & Orgs"] ROLES --> LOG["User Authenticates -> Tracked Session"] LOG --> MON["Inspect /activity & /sessions"] MON -->|"Compromised Device"| REV["DELETE .../sessions/revoke-all"]
Users onboard via email invite, direct creation, JIT, or SCIM 2.0, then authenticate into tracked sessions that admins can inspect or revoke in real time.
https://cloudpulse.us.beta.sso.id/user-management Click to zoom
User Directory Management console at /user-management with search, invitations, and account lifecycle actions.
User Directory Management console at /user-management with search, invitations, and account lifecycle actions.

2. Assigning Application Roles & Inspecting Effective Access

Opening the User Setting Dialog in /user-management lets you manage the user's complete access graph:

  • Roles Tab (GET / POST / DELETE /api/users/{userId}/roles): Assign or revoke Roles scoped to specific Applications.
  • Groups & Organizations: View which User Groups, B2B Organizations, and Organization Units the user belongs to.
  • Login Activity & Last Login (GET /api/users/{userId}/activity & /last-login): Inspect every historical authentication event, IP address, user-agent, and failure reason for that specific user.

3. Real-Time Device Session Inspection & Revocation

Every interactive login or token refresh creates a tracked session record associated with the user:

  • GET /api/users/{userId}/sessions — Lists every active session with device type, browser, IP address, creation time, and last activity timestamp.
  • DELETE /api/users/{userId}/sessions/{sessionId} — Terminates a single suspicious device session without disturbing the user's other devices.
  • DELETE /api/users/{userId}/sessions/revoke-all — Emergency kill-switch that revokes all active sessions and refresh tokens for the user across the entire tenant.

4. Safe Deletion (Tenant Ownership Check) & Admin GDPR Export

Before deleting a user account (DELETE /api/users/{id}), SSO.ID v2 runs a safety check via GET /api/users/{userId}/tenant-ownership to verify whether the user is the sole owner of any Tenant workspaces, preventing accidental orphaned tenants. Admins can also export a user's complete compliance archive on demand via GET /api/compliance/users/{userId}/export.

5. User Management REST API Reference

Method Endpoint Description
GET / POST https://{your-tenant}.sso.id/api/users Lists directory users (paginated/filtered) or creates a new user directly.
POST https://{your-tenant}.sso.id/api/users/invite Sends an onboarding invitation email (POST /api/users/{userId}/resend-invite resends).
GET / PUT / DELETE https://{your-tenant}.sso.id/api/users/{id} Retrieves, updates, or deletes a specific user record.
GET / POST / DELETE https://{your-tenant}.sso.id/api/users/{userId}/roles Lists, assigns, or removes Roles (DELETE .../roles/{roleId}) for a user.
GET https://{your-tenant}.sso.id/api/users/{userId}/activity Returns chronological authentication history (GET .../activity/last-login returns most recent login).
GET / DELETE https://{your-tenant}.sso.id/api/users/{userId}/sessions Lists active sessions, revokes one (DELETE .../{sessionId}), or revokes all (DELETE .../revoke-all).

User Directory Lifecycle & SCIM 2.0 Provisioning API Specifications

Below is the complete parameter-level specification for every endpoint in this module. Tenant context is automatically resolved from the signed Bearer JWT token claims or the tenant domain URL (no custom tenant header is required).

GET https://{your-tenant}.sso.id/api/users
Bearer JWT

Queries and paginates directory users in the tenant workspace with rich filtering by search keyword, status, assigned application, group, role, or creation date range. To retrieve a single user by UUID, call GET /api/users/{id}.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
page Query integer Optional 1-based page index (default: 1).
limit Query integer Optional Maximum records per page (default: 25, max: 200).
filter Query string Optional Case-insensitive search across email, first name, last name, and phone number.
order Query string Optional Sort expression (e.g., -CreatedOn, FirstName, EmailAddress).
status Query integer Optional Filter by account status: 1 = Active, 0 = Suspended/Locked, 2 = Pending Invitation.
applicationId Query string (UUID) Optional Filter users assigned to a specific Application UUID.
groupId Query string (UUID) Optional Filter users belonging to a specific Group UUID.
roleName Query string Optional Filter users holding a specific Role name.
startDate Query string (ISO 8601) Optional Filter users created on or after this UTC date.
endDate Query string (ISO 8601) Optional Filter users created on or before this UTC date.
Response Fields & Schema
Field Type Description
userId string (UUID) Unique directory User UUID.
emailAddress string Primary email address.
firstName string Given name.
lastName string Family name.
phoneNumber string Primary phone number.
status integer Account status (1 = Active, 0 = Suspended, 2 = Invited).
isMultifactor boolean Whether MFA is active for the user.
userSource string Onboarding source (Directory, Invite, SCIM, Google, SAML).
createdOn string (ISO 8601) Account creation UTC timestamp.
Sample Request
curl -X GET "https://{your-tenant}.sso.id/api/users?page=1&limit=25&filter=mercer&status=1" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..."
Expected Response 200 OK
[
  {
    "userId": "usr_9f8e7d6c-5b4a-3c2d-1e0f-9a8b7c6d5e4f",
    "emailAddress": "[email protected]",
    "firstName": "Liam",
    "lastName": "Mercer",
    "phoneNumber": "+14155550192",
    "status": 1,
    "isMultifactor": true,
    "userSource": "Invite",
    "createdOn": "2026-10-12T14:22:00Z"
  }
]
POST https://{your-tenant}.sso.id/api/users
Bearer JWT

Creates a new directory user account directly with profile attributes and an initial password (validated against the active Tenant Password Policy). To update an existing user, call PUT /api/users/{id}; to delete, call DELETE /api/users/{userId}.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
emailAddress Body string Required Unique email address for the user.
firstName Body string Required User's first name.
lastName Body string Required User's last name.
password Body string Required Initial password meeting tenant complexity requirements.
phoneNumber Body string Optional Telephone number.
mobileNumber Body string Optional Mobile number in E.164 format for SMS MFA.
countryName Body string Optional Country name.
cityName Body string Optional City name.
address Body string Optional Street address.
zipCode Body string Optional Postal/ZIP code.
language Body string Optional Preferred locale (default: en-US).
status Body integer Optional Initial status (1 = Active, 0 = Suspended).
selectedRoleId Body string (UUID) Optional Optional initial Role ID to assign upon creation.
applicationId Body string (UUID) Optional Optional Application ID to link the user to immediately.
Response Fields & Schema
Field Type Description
userId string (UUID) Newly created User UUID.
emailAddress string User email address.
status integer Account status (1).
createdOn string (ISO 8601) Creation timestamp.
Sample Request
curl -X POST "https://{your-tenant}.sso.id/api/users" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "emailAddress": "[email protected]",
    "firstName": "Elena",
    "lastName": "Rostova",
    "password": "SsoId#2026!SecurePassword",
    "phoneNumber": "+14155550144",
    "countryName": "United States",
    "cityName": "Seattle",
    "status": 1
  }'
Expected Response 201 Created
{
  "userId": "usr_33445566-7788-499a-b00c-ddeeff112233",
  "emailAddress": "[email protected]",
  "firstName": "Elena",
  "lastName": "Rostova",
  "status": 1,
  "createdOn": "2026-11-19T12:40:00Z"
}
POST https://{your-tenant}.sso.id/api/users/invite
Bearer JWT

Creates a pending user record and dispatches a branded onboarding invitation email containing a one-time cryptographically signed activation link. To resend an unaccepted invitation, call POST /api/users/{userId}/resend-invite.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
email Body string Required Recipient email address to invite.
applicationId Body string (UUID) Optional Optional Application UUID to pre-assign to the invited user.
roleId Body string (UUID) Optional Optional Role UUID to grant upon invitation acceptance.
role Body string Optional Optional Role name if roleId is not specified.
Response Fields & Schema
Field Type Description
userId string (UUID) Created User UUID with status 2 (Invited).
email string Invited email address.
inviteSent boolean True when the SMTP invitation email was dispatched.
expiresAtUtc string (ISO 8601) Invitation link expiration timestamp.
Sample Request
curl -X POST "https://{your-tenant}.sso.id/api/users/invite" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "email": "[email protected]",
    "applicationId": "app_7712b",
    "roleId": "rol_3310a"
  }'
Expected Response 200 OK
{
  "userId": "usr_88776655-4433-4221-a110-ffeeddccbbaa",
  "email": "[email protected]",
  "inviteSent": true,
  "expiresAtUtc": "2026-11-26T12:42:00Z"
}
POST https://{your-tenant}.sso.id/api/users/{userId}/roles
Bearer JWT

Assigns an Application Role to a user. Use GET /api/users/{userId}/roles?appId={appId} to list a user's roles, and DELETE /api/users/{userId}/roles/{roleId} to revoke a role.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required Bearer JWT access token (Bearer eyJhbG...). Tenant context is resolved automatically from the token claims or request domain URL.
userId Path string (UUID) Required Target User UUID.
userId Body string (UUID) Required Target User UUID.
roleId Body string (UUID) Required Role UUID to assign.
applicationId Body string (UUID) Required Application UUID to which the role belongs.
Response Fields & Schema
Field Type Description
userId string (UUID) User UUID.
roleId string (UUID) Assigned Role UUID.
applicationId string (UUID) Application UUID.
createdOn string (ISO 8601) Assignment timestamp.
Sample Request
curl -X POST "https://{your-tenant}.sso.id/api/users/usr_33445566/roles" \
  -H "Authorization: Bearer eyJhbGciOiJSUzI1NiIs..." \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "usr_33445566",
    "roleId": "rol_3310a",
    "applicationId": "app_7712b"
  }'
Expected Response 200 OK
{
  "userId": "usr_33445566",
  "roleId": "rol_3310a",
  "applicationId": "app_7712b",
  "createdOn": "2026-11-19T12:43:00Z"
}
POST https://{your-tenant}.sso.id/api/scim/v2/Users
SCIM 2.0 Bearer Token

RFC 7643 / 7644 SCIM 2.0 User Provisioning Endpoint. Allows enterprise workforce directories (Okta, Microsoft Entra ID, OneLogin, Rippling) to automatically provision, update (PUT / PATCH /api/scim/v2/Users/{id}), query (GET /api/scim/v2/Users?filter=userName eq "..."), or deprovision (DELETE /api/scim/v2/Users/{id}) users.

Request Parameters
Parameter Type Required Description & Constraints
Authorization Header string Required SCIM 2.0 Bearer token (Bearer scim_tok_...) generated in Tenant or Connection settings.
schemas Body array Required Must include ["urn:ietf:params:scim:schemas:core:2.0:User"].
userName Body string Required Unique user identifier (typically primary work email address).
externalId Body string Optional Immutable identifier from the upstream HRIS / Identity Provider.
name Body object Required SCIM Name object containing givenName, familyName, and formatted.
displayName Body string Optional Full display name.
emails Body array Required Array of email objects: [{ "value": "...", "type": "work", "primary": true }].
phoneNumbers Body array Optional Array of phone objects: [{ "value": "...", "type": "work" }].
active Body boolean Optional Set to true to enable sign-in; set to false via PATCH to immediately suspend and revoke sessions.
Response Fields & Schema
Field Type Description
schemas array SCIM 2.0 Core User schema URI.
id string (UUID) Generated SSO.ID User UUID.
externalId string Echoed upstream externalId.
userName string Canonical username/email.
active boolean Provisioned active status.
meta ScimMeta SCIM resource metadata (resourceType, created, lastModified, location).
Sample Request
curl -X POST "https://{your-tenant}.sso.id/api/scim/v2/Users" \
  -H "Authorization: Bearer scim_tok_9918273645abcdef" \
  -H "Content-Type: application/scim+json" \
  -d '{
    "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
    "externalId": "okta_usr_00u1928374",
    "userName": "[email protected]",
    "name": {
      "givenName": "Sarah",
      "familyName": "Connor",
      "formatted": "Sarah Connor"
    },
    "emails": [
      { "value": "[email protected]", "type": "work", "primary": true }
    ],
    "active": true
  }'
Expected Response 201 Created
{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "id": "usr_77112233-4455-4667-8899-aabbccddeeff",
  "externalId": "okta_usr_00u1928374",
  "userName": "[email protected]",
  "name": {
    "givenName": "Sarah",
    "familyName": "Connor",
    "formatted": "Sarah Connor"
  },
  "active": true,
  "meta": {
    "resourceType": "User",
    "created": "2026-11-19T12:45:00Z",
    "lastModified": "2026-11-19T12:45:00Z",
    "location": "https://{your-tenant}.sso.id/api/scim/v2/Users/usr_77112233-4455-4667-8899-aabbccddeeff"
  }
}
AI Agent Prompt Build an Admin User Invitation, Role Assignment & Session Revocation Service
You are a backend systems engineer. Implement a **User Lifecycle & Security Service** in our backend that integrates with **SSO.ID v2** (`https://{your-tenant}.sso.id/api`).

All requests must include `Authorization: Bearer ` (tenant context is automatically resolved from the JWT token claims and tenant domain URL).
Implement the following methods:
1. `inviteTeamMember(email, firstName, lastName, roleIds)`:
   - Calls `POST https://{your-tenant}.sso.id/api/users/invite` and assigns initial roles via `POST https://{your-tenant}.sso.id/api/users/{userId}/roles`.
2. `getUserSecurityOverview(userId)`:
   - Calls `GET /api/users/{userId}`, `GET /api/users/{userId}/activity/last-login`, and `GET /api/users/{userId}/sessions` in parallel.
3. `emergencyLockAndRevoke(userId)`:
   - Calls `DELETE https://{your-tenant}.sso.id/api/users/{userId}/sessions/revoke-all` to immediately terminate all active web/mobile sessions for a compromised user.