Save SSO Config
Enabling SSO for an organisation requires this order:
POST /organisations/{org_id}/domains- claim the identity domain.POST /organisations/{org_id}/domains/{domain_id}/verify- prove control via a DNS TXT record. SSO cannot be configured until at least one domain is verified.PUT /organisations/{org_id}/sso(this endpoint) - point at the provider's OIDC issuer; provisions a matching Keycloak identity provider.- Optionally
PATCH /organisations/{org_id}/policywithrequire_sso: trueto force every member through SSO - only accepted once an active SSO config exists, so members can never be locked out.
Configure (or reconfigure) SSO for the organisation.
Authorization: caller must be the owner.
Preconditions:
- The organisation must have at least one verified domain (proves control over the identity domain before delegating auth to it).
- The issuer URL must expose a valid OIDC discovery document.
Provisions or updates a Keycloak identity provider named after the organisation's slug, then persists the config with the client secret encrypted at rest.
Authorization
OAuth2AuthorizationCodeBearer AuthorizationBearer <token>
In: header
Path Parameters
org_id*Org Id
Format
uuidQuery Parameters
verify_locally?Verify Locally
Default
trueRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PUT "https://example.com/v1/organisations/497f6eca-6276-4993-bfeb-53cbbbba6f08/sso" \ -H "Content-Type: application/json" \ -d '{ "issuer_url": "string", "client_id": "string", "client_secret": "string" }'{ "status": "string", "issuer_url": "string", "client_id": "string", "client_secret": "string", "enabled": false}{ "detail": [ { "loc": [ "string" ], "msg": "string", "type": "string" } ]}