Docs
Open the console →
API reference

API reference: SAML & SCIM

Cloud Control SAML 2.0 SSO endpoints (metadata, SP-initiated login, ACS), the per-organization SAML/SCIM/group-mapping configuration APIs, and the SCIM 2.0 provisioning surface (Users, Groups, discovery).

SAML 2.0 sign-in (public)

GET/api/auth/saml/metadataPublic

SP metadata XML (entity ID + HTTP-POST ACS). Import this into your IdP.

Example response
xml
<md:EntityDescriptor entityID="https://host/api/auth/saml/metadata">…</md:EntityDescriptor>
POST/api/auth/saml/loginPublic

Begin SP-initiated SSO: match the work email domain / org slug to an enabled SAML config and return the IdP redirect URL (deflate+base64 AuthnRequest).

Parameters
NameInRequiredDescription
emailbodynoWork email (its domain is matched).
slugbodynoOrganization slug (alternative to email).
Example request
json
{ "email": "alice@corp.example" }
Example response
json
{ "ok": true, "redirectUrl": "https://idp/sso?SAMLRequest=…&RelayState=…", "requestId": "_abc…" }
Errors
StatusWhen
404SAML isn't configured for that domain/org (enumeration-safe, generic).
POST/api/auth/saml/acsPublic (form POST binding)

Assertion Consumer Service: verify the signed assertion (exc-c14n + RSA-SHA256, Conditions, single-use replay), JIT-match by email with the group-mapped role, and set a session cookie (303 to /).

Parameters
NameInRequiredDescription
SAMLResponsebodyyesbase64 SAML Response (application/x-www-form-urlencoded).
RelayStatebodynoRound-tripped from the AuthnRequest.
Errors
StatusWhen
303Success — redirect to / with a session cookie.
400Bad/expired/replayed/unsigned/tampered assertion, wrong audience, or InResponseTo mismatch (generic).
403The organization is suspended.

SAML config (Org Admin, session only)

POST/api/org/samlOrg Admin (session only)

Create/update the org's SAML config. Accepts pasted IdP metadata XML (auto-fills entity ID / SSO URL / cert) or explicit fields. The signing certificate is validated on save.

Parameters
NameInRequiredDescription
metadataXmlbodynoIdP metadata XML — entity ID / SSO URL / cert are extracted from it.
idpEntityIdbodynoIdP entity ID (required if no metadata).
ssoUrlbodynoIdP SSO URL (https).
certificatebodynoIdP X.509 signing cert (PEM or base64). Public value.
defaultRolebodynoRole when no group maps; default Viewer.
emailDomainsbodynoDomains routed to this IdP.
attrEmailbodynoAssertion attribute for email (blank ⇒ NameID).
attrGroupsbodynoAssertion attribute for group membership.
Example response
json
{ "ok": true, "saml": { "idpEntityId": "…", "ssoUrl": "…", "certificateSet": true, "defaultRole": "Viewer", "emailDomains": ["corp.example"], "attrGroups": "groups", "enabled": true } }
Errors
StatusWhen
400Missing entity ID, non-https SSO URL, unusable certificate, bad role/domains, or unparseable metadata.
403Caller lacks manage_users_sso.

GET /api/org/saml returns the config (cert never echoed, only certificateSet); PATCH /api/org/saml toggles { enabled }.

SCIM tokens & group mappings (Org Admin, session only)

POST/api/org/scimOrg Admin (session only)

Issue a per-org SCIM bearer token (cc_scim_…, shown once) and the SCIM base URL.

Example response
json
{ "ok": true, "id": 3, "token": "cc_scim_…", "scimBaseUrl": "https://host/api/scim/v2" }

GET /api/org/scim lists token metadata; DELETE /api/org/scim/{id} revokes. GET/POST /api/org/group-mappings lists / upserts a { groupName, role } mapping; DELETE /api/org/group-mappings/{id} clears a group's role.

SCIM 2.0 provisioning (per-org Bearer token)

All /api/scim/v2/* endpoints require Authorization: Bearer <cc_scim_…> and return application/scim+json. Discovery: GET /ServiceProviderConfig, GET /ResourceTypes, GET /Schemas.

POST/api/scim/v2/UsersSCIM Bearer

Provision a user (JIT). Role starts at the SCIM default (Viewer) and is elevated by group membership. Duplicate userName → 409 uniqueness.

Example request
json
{ "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"], "userName": "alice@corp.example", "name": { "formatted": "Alice A" }, "active": true, "externalId": "0oaExt…" }
Example response
json
{ "schemas": ["…:User"], "id": "42", "userName": "alice@corp.example", "active": true, "roles": [{ "value": "Viewer", "primary": true }], "meta": { "resourceType": "User" } }
Errors
StatusWhen
401Missing/invalid/revoked SCIM token (SCIM error envelope).
409A user with that userName already exists (scimType uniqueness).
PATCH/api/scim/v2/Users/{id}SCIM Bearer

RFC 7644 PatchOp. replace/add of active (active:false deprovisions = deactivate + kill sessions; active:true reactivates), displayName, externalId.

Example request
json
{ "Operations": [{ "op": "replace", "path": "active", "value": false }] }

Also: GET /Users?filter=userName eq "x" (and externalId eq), GET /Users/{id}, PUT /Users/{id}, DELETE /Users/{id} (deprovision, 204). Groups: GET/POST /Groups, GET/PATCH/PUT/DELETE /Groups/{id} — PATCH members add/remove applies the group→role mapping to each member.