Create a new SSO configuration for an organization
Each organization can have at most one SSO configuration. Creating a config for an organization that already has one will result in a 409 Conflict error.
Request
- Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
- URL: /admin/v1/organizations/{org_slug}/sso-config
- Auth: HTTP bearer
Path parameters
Organization slug
Request body
Allowed email domains (empty = allow all)
OAuth2 client ID (required for OIDC, not used for SAML)
OAuth2 client secret (will be stored in secret manager) Required for OIDC, not used for SAML
Whether to create new users on first login (default: true)
Default role for new users in the organization (default: "member")
Default team to add new users to (optional)
Default role for new users in the default team (default: "member")
Discovery URL for OIDC metadata (optional - defaults to issuer/.well-known/openid-configuration)
Whether this SSO config is active (default: true)
SSO enforcement mode.
JWT claim containing group memberships (optional)
JWT claim to use as the user's identity (default: "sub")
OIDC issuer URL (e.g., "https://accounts.google.com") Required for OIDC, not used for SAML
JWT claim containing organization IDs (optional)
SSO provider type.
Whether JIT provisioning is enabled (default: true)
Redirect URI for OAuth2 callback (optional - uses global default if not set)
Requested authentication context class
SAML attribute name for email
Whether to force re-authentication at IdP (default: false)
SAML attribute name for groups
SAML attribute name for user identity (like identity_claim for OIDC)
IdP X.509 certificate for signature validation (PEM format)
IdP entity identifier (e.g., "https://idp.example.com/metadata")
IdP Single Logout service URL (optional)
IdP Single Sign-On service URL (HTTP-Redirect or HTTP-POST binding)
IdP metadata URL for auto-configuration (alternative to manual config)
SAML attribute name for display name
NameID format to request (e.g., 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress')
Whether to sign AuthnRequests (default: false)
SP X.509 certificate for metadata (PEM format)
Service Provider entity ID (Hadrian's identifier to the IdP)
SP private key for signing AuthnRequests (PEM format, will be stored in secret manager)
OAuth2 scopes to request (defaults to ["openid", "email", "profile"])
Whether to sync user attributes on each login (default: false)
Whether to sync team memberships from IdP groups on each login (default: true)
Response
SSO config created
Allowed email domains (empty = allow all)
OAuth2 client ID (required for OIDC, not used for SAML)
Whether to create new users on first login
When this config was created
Default role for new users in the organization
Default team to add new users to (optional)
Default role for new users in the default team
Discovery URL for OIDC metadata (defaults to issuer/.well-known/openid-configuration)
Whether this SSO config is active
SSO enforcement mode.
JWT claim containing group memberships (optional, OIDC only)
Unique identifier for this SSO configuration
JWT claim to use as the user's identity (default: "sub") Required for OIDC, not used for SAML (use saml_identity_attribute instead)
OIDC issuer URL (e.g., "https://accounts.google.com") Required for OIDC, not used for SAML
JWT claim containing organization IDs (optional, OIDC only)
Organization this SSO config belongs to (one config per org)
SSO provider type.
Whether JIT provisioning is enabled for this SSO config
Redirect URI for OAuth2 callback (optional - uses global default if not set)
Requested authentication context class
SAML attribute name for email
Whether to force re-authentication at IdP
SAML attribute name for groups
SAML attribute name for user identity (like identity_claim for OIDC)
IdP X.509 certificate for signature validation (PEM format)
IdP entity identifier (e.g., "https://idp.example.com/metadata")
IdP Single Logout service URL (optional)
IdP Single Sign-On service URL (HTTP-Redirect or HTTP-POST binding)
IdP metadata URL for auto-configuration (alternative to manual config)
SAML attribute name for display name
NameID format to request (e.g., 'urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress')
Whether to sign AuthnRequests
SP X.509 certificate for SP metadata (PEM format) Include when request signing is enabled so IdPs can verify signatures
Service Provider entity ID (Hadrian's identifier to the IdP)
OAuth2 scopes to request (e.g., ["openid", "email", "profile"]) Empty for SAML configs
Whether to sync user attributes (email, name) on each login
Whether to sync team memberships from IdP groups on each login
When this config was last updated
Changes
No recorded changes to this operation across all 1 revision of this API.