Create or update team SSO configuration REST API
const url = 'http://127.0.0.1:25737/api/user/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/sso';const options = { method: 'PUT', headers: {cookie: 'hk_token=<hk_token>', 'Content-Type': 'application/json'}, body: '{"allowed_domains":["example"],"auto_provision":true,"client_id":"example","client_secret":"example","display_name_claim":"name","email_claim":"email","enabled":true,"issuer_url":"https://example.com","provider_type":"oidc"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://127.0.0.1:25737/api/user/teams/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/sso \ --header 'Content-Type: application/json' \ --cookie hk_token=<hk_token> \ --data '{ "allowed_domains": [ "example" ], "auto_provision": true, "client_id": "example", "client_secret": "example", "display_name_claim": "name", "email_claim": "email", "enabled": true, "issuer_url": "https://example.com", "provider_type": "oidc" }'Validates OIDC discovery and stores the client secret encrypted with the instance key. Leave client_secret blank to keep an existing secret, or provide a new value to rotate it. Enabling this configuration adds SSO as an optional login method; password login is unchanged.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
When true, verified users from trusted domains may join this team as Members without an invitation. Managed-cloud seat and team limits still apply.
Required on create. Blank preserves the stored secret on update.
Responses
Section titled “Responses”Redacted team SSO configuration
Redacted team OIDC configuration. The client secret is never returned.
object
Example
{ "provider_type": "oidc"}Invalid configuration or missing client secret
object
Examplegenerated
{ "message": "example"}Team settings permission or SSO entitlement required
object
Examplegenerated
{ "message": "example"}An allowed email domain belongs to another team SSO configuration
object
Examplegenerated
{ "message": "example"}OIDC discovery failed
object
Examplegenerated
{ "message": "example"}