Set the organisation's single sign-on and its e-mail domains
curl --request PUT \ --url https://api.whatsbuilt.fi/v1/organisation/sso \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "provider": "saml", "ssoDomains": [ "example" ], "defaultRole": "admin", "ssoUrl": "https://example.com", "entityId": "example", "certificate": "example", "metadataUrl": "https://example.com", "metadataXml": "example" }'SAML only: an OIDC configuration answers 400 SSO_OIDC_UNSUPPORTED and changes nothing, because sign-in runs on Cognito, which gets no OIDC identity provider. A domain another organisation signs in with answers 409. People of the domains sign in through the identity provider from then on.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”The body of an SSO configuration, SsoConfigBody.
SAML.
object
The SAML discriminator.
The role new users of the domains get.
OpenID Connect.
object
The OpenID Connect discriminator.
The role new users of the domains get.
Responses
Section titled “Responses”SSO
SsoSettings: the organisation’s single sign-on.
object
Secrets are replaced by has_* markers
What the service provider side of SAML looks like to the identity provider.
object
object
Example generated
{ "provider": "example", "domains": [ "example" ], "default_role": "example", "config": "example", "service_provider": { "acs_url": "example", "entity_id": "example", "login_url": "example", "attribute_mapping": { "additionalProperty": "example" }, "is_placeholder": true }}Invalid body; SSO_OIDC_UNSUPPORTED: OIDC single sign-on is not available
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}INSUFFICIENT_SCOPE; INSUFFICIENT_ROLE when the principal is not an admin of its organisation; PUBLIC_API_DISABLED
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Not found in the organisation
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}SSO_DOMAIN_TAKEN: a domain belongs to another organisation; SSO_IDP_NAME_TAKEN: the identity provider name belongs to another organisation
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED; wait for Retry-After seconds
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}The identity provider could not be reached
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}