Skip to content

security

Intended Documentation

Identity Provider Operations

Inspect tenant identity readiness, run the OIDC/SAML SSO flows, and operate SCIM v2 provisioning — exact endpoints, readiness states, auth requirements, and failure modes.

Identity Provider Operations#

The identity surface has three parts: a readiness view that tells you whether a tenant's SSO is fully configured, the SSO runtime endpoints that execute the OIDC/SAML flows, and SCIM v2 endpoints for provisioning users and groups from your IdP.

Inspect tenant identity readiness#

GET/admin/identityRequires auth

Returns the tenant's identity configuration and a computed readiness state. Requires trust:read.

tenantIdstring*Tenant identifier; must match credential and x-tenant-id.
bash
curl "https://api.intended.so/admin/identity?tenantId=tenant_acme_prod" \
  -H "Authorization: Bearer $INTENDED_API_KEY" \
  -H "x-tenant-id: tenant_acme_prod"

The identity object reports readiness, identityProviderType (oidc · saml · null), the issuer / metadata URL, domainHints, allowPasswordFallback, breakGlassEnabled / breakGlassContacts, and a metadata.runtime block listing exactly which configuration fields are still missing.

Readiness states#

Readiness is derived from the configuration, not stored independently:

StateMeaning
not_configuredNo identity provider configuration is present
partialSome configuration exists, but required fields are missing — metadata.runtime.notes lists them (e.g. "OIDC client secret is required.")
readyAll required fields are present; the SSO flow will run

For OIDC, ready requires issuer, client ID, client secret, and redirect URI. For SAML, it requires the SP entity ID, the ACS URL, the IdP signing certificate, and an IdP metadata URL or SSO URL.

SSO runtime endpoints#

The SSO flows are public (skip-auth) routes — they are how a user obtains a session — so they are not behind the admin permission check. The portal app uses the /amp/* prefix; the backoffice app uses /ebo/*.

Portal (OIDC + SAML):

  • GET /amp/auth/sso/start
  • GET /amp/auth/sso/callback
  • POST /amp/auth/sso/saml/acs

Backoffice (OIDC):

  • GET /ebo/auth/sso/start
  • GET /ebo/auth/sso/callback

SAML ACS is portal-only

The SAML assertion consumer endpoint (POST /amp/auth/sso/saml/acs) exists only on the portal (/amp) flow. The backoffice (/ebo) flow is OIDC start/callback only — there is no /ebo/auth/sso/saml/acs. SSO callbacks only succeed when the tenant's identity readiness is ready.

SCIM v2 provisioning#

SCIM lets your IdP provision and deprovision users and groups directly. Six endpoints are implemented (no DELETE — deactivation is via a SCIM PATCH setting active: false):

  • GET /scim/v2/Users · POST /scim/v2/Users · PATCH /scim/v2/Users/:id
  • GET /scim/v2/Groups · POST /scim/v2/Groups · PATCH /scim/v2/Groups/:id

SCIM authentication and scope#

SCIM does not use the enterprise admin permission model. Instead each call requires a verified tenant context (legacy_header credentials are rejected) plus a SCIM-capable scope or permission:

  • An API key must carry one of the scopes admin:config:write, account:team:invite, or account:team:read.
  • A portal session must hold the admin:config:write permission.

The x-tenant-id header, if present, must match the verified tenant context.

SCIM is verified-context only

SCIM provisioning requires an intended_live_ API key or a portal session that the gate has cryptographically verified. Local development legacy identity headers (x-user-*) are explicitly rejected with 403 TRUST_CONTEXT_INSUFFICIENT.

Create a user#

bash
curl -X POST https://api.intended.so/scim/v2/Users \
  -H "Authorization: Bearer $INTENDED_API_KEY" \
  -H "x-tenant-id: tenant_acme_prod" \
  -H "Content-Type: application/scim+json" \
  -d '{
    "userName": "alice@acme.com",
    "externalId": "idp-user-123",
    "name": { "givenName": "Alice", "familyName": "Ng" },
    "emails": [{ "value": "alice@acme.com", "primary": true }],
    "active": true
  }'

SCIM role values from the IdP are mapped to portal roles (owner/admin → admin, reviewer/approver → approver, operator/developer → operator, auditor/read_only → viewer, otherwise viewer).

Failure modes#

Admin identity endpoint:

StatusCodeCause
400INVALID_ADMIN_IDENTITY_QUERYMissing/invalid tenantId
403TENANT_MISMATCHx-tenant-id ≠ query tenantId
403FORBIDDEN (+ permission: "trust:read")Role lacks trust:read

SCIM endpoints:

StatusCodeCause
401TENANT_CONTEXT_REQUIREDNo verified tenant context
401AUTH_CONTEXT_INVALIDCould not resolve an authenticated actor
403TRUST_CONTEXT_INSUFFICIENTCredential is unverified or a legacy header
403TENANT_MISMATCHx-tenant-id ≠ verified tenant
403FORBIDDENAPI-key scope / portal permission insufficient for SCIM
400VALIDATION_ERRORSCIM body failed schema validation
404SCIM_USER_NOT_FOUND / SCIM_GROUP_NOT_FOUNDTarget resource not in this tenant
429SCIM_RATE_LIMITEDSCIM request rate exceeded

Next Steps#

Identity Provider Operations | Intended