Skip to content

Change the single sign-on settings

PUT
/api/settings/sso
curl --request PUT \
--url https://forge.example.com/api/settings/sso \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "kind": "example", "issuer": "example", "clientId": "example", "clientSecret": "example", "tenantId": "example", "jit": true, "defaultRole": "example", "enabled": true, "version": 1, "groupsClaim": "example", "secondStepValues": "example" }'

Send the settings’ version as you read it, 0 while nothing was saved. A stale one answers 409 with currentVersion, the version it has now. Turning OpenID Connect on turns SAML off, which moves SAML’s version on too. For administrators.

Media typeapplication/json
object
kind
required
string
issuer
required
string
clientId
required
string
clientSecret
required
null | string
tenantId
required
null | string
jit
required
boolean
defaultRole
required
string
enabled
required
boolean
version
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
groupsClaim
null | string
secondStepValues
null | string

Example generated

{
"kind": "example",
"issuer": "example",
"clientId": "example",
"clientSecret": "example",
"tenantId": "example",
"jit": true,
"defaultRole": "example",
"enabled": true,
"version": 1,
"groupsClaim": "example",
"secondStepValues": "example"
}

OK

Media typeapplication/json
object
kind
required
string
issuer
required
string
clientId
required
string
hasClientSecret
required
boolean
tenantId
required
null | string
jit
required
boolean
defaultRole
required
string
enabled
required
boolean
domains
required
Array<string>
redirectUri
required
string
groupsClaim
null | string
secondStepValues
null | string
clientSecretProtection
One of:
null
version
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

Example

{
"clientSecretProtection": {
"revealable": false
}
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}