API reference

SAML SSO

Find the SAML connection for an email, start an SP-initiated sign-in, and the URLs your identity provider calls.

SAML SSO is set up per workspace (the connection, its verified email domains and whether SSO is enforced). A client workspace uses the connection of the nearest workspace above it that has one. These routes are what a sign-in page calls to send a person to their identity provider (IdP).

Find the SSO connection for an email#

GET/v1/auth/saml/discoverNone

Home-realm discovery: looks up the email's domain among verified SAML domains.

emailstringrequired
The email the person typed.
cURLbash
curl "https://api.scute.io/v1/auth/saml/discover?email=ada@acme.com"
Response 200json
{  "workspace_id": "0193f8aa-0000-7000-8000-000000000000",  "saml_login_url": "https://api.scute.io/v1/auth/app_xxx/saml/login",  "enforce_sso": true}

Send the browser to saml_login_url. When enforce_sso is true, every other way of signing in returns 403 sso_required for this domain.

A domain with no enabled connection returns 404 with {"error": "sso_not_available"}.

Start a SAML sign-in#

GET/v1/auth/:app_id/saml/loginNone

Redirects (302) to the IdP with a SAML AuthnRequest. Open it in the browser.

URL
https://api.scute.io/v1/auth/app_xxx/saml/login

Returns 404 saml_not_configured when the app's workspace has no enabled connection.

After the IdP posts the assertion back, Scute redirects to the app's origin plus login URL with sct_oauth=<token>&sct_sk=true. Exchange the token with Authenticate a magic link to get the session.

URLs for the identity provider#

The IdP calls these. You enter them in the IdP's SAML app, or import the metadata.

EndpointUse
GET /v1/auth/:workspace_id/saml/metadata.xmlService provider metadata (entity ID, ACS URL, signing certificate). Returns 404 saml_not_configured until the connection is enabled.
POST /v1/auth/:workspace_id/saml/acsAssertion consumer service. The IdP posts the SAML response here.
GET or POST /v1/auth/:workspace_id/saml/sloSingle logout. Takes the IdP's LogoutRequest, and the LogoutResponse of a logout Scute started.

Signing out at the IdP ends the Scute session that the SAML sign-in created.

Rate limits#

The ACS, SLO and login routes allow 60 requests per minute per IP address. Over the limit they return 429.