SSO & SCIM
Enterprise single sign-on with OIDC and SAML 2.0, plus SCIM 2.0 for automated user provisioning and deprovisioning from identity providers.
SSO Configuration
The organization is taken from the authenticated session; it is not passed in the request body. Use the import endpoints below to create a configuration from your provider's OIDC discovery or SAML metadata.
List SSO Configs
GET /v1/sso/configs Query Parameters
| Parameter | Type | Description |
|---|---|---|
auth_method | string | Filter by oidc or saml |
is_active | boolean | Filter by active status |
page | integer | 1-based page number |
page_size | integer | Results per page (max 100) |
Import OIDC Configuration
POST /v1/sso/configs/import-oidc
Supply your provider's HTTPS issuer base URL as discovery_url,
together with the client ID and client secret from your provider's application
registration. Use the base URL, without the
/.well-known/openid-configuration suffix.
Request Body
{
"discovery_url": "https://your-org.okta.com",
"client_id": "your-client-id",
"client_secret": "your-client-secret"
} Import SAML Configuration
POST /v1/sso/configs/import-saml Supply the public HTTPS metadata URL provided by your identity provider. Backbuild imports its entity ID, sign-in URL and signing certificate. This is the identity provider's metadata URL; the Backbuild Service Provider metadata URL is described below.
Request Body
{
"metadata_url": "https://your-idp.example.com/saml/metadata"
}
The organization is taken from the authenticated session. System-assigned fields
(id, created_at, updated_at) are never
supplied in the request body; they are assigned by the platform.
Imported configurations are active and are not marked as the default.
The generic POST /v1/sso/configs endpoint accepts
auth_method, provider_config, is_active
and is_default, but rejects plaintext secrets and unsupported
fields inside provider_config. Use the OIDC import endpoint
when supplying a client secret.
Response
Returns the full created configuration on success; secret reference values in
provider_config are redacted in the response.
{
"success": true,
"data": {
"id": "...",
"org_id": "...",
"auth_method": "oidc",
"provider_config": {
"issuer": "https://your-org.okta.com",
"client_id": "your-client-id"
},
"is_active": true,
"is_default": false,
"created_at": "2026-04-13T10:00:00Z",
"updated_at": "2026-04-13T10:00:00Z"
}
} Response Codes
| Status | Meaning |
|---|---|
201 Created | Configuration created; the full record is returned (secrets redacted) |
400 Bad Request | Missing or invalid input, a disallowed provider URL, an invalid discovery document or SAML metadata, or the per-organization configuration limit reached |
401 Unauthorized | Authentication required or invalid |
403 Forbidden | Caller lacks the identity-management permission or active membership |
409 Conflict | A conflicting configuration already exists |
500 Internal Server Error | Unexpected server error |
502 Bad Gateway | The provider's discovery or metadata could not be fetched |
503 Service Unavailable | Required configuration services are unavailable |
504 Gateway Timeout | The provider's discovery or metadata request timed out |
Update SSO Config
PUT /v1/sso/configs/:id Delete SSO Config
DELETE /v1/sso/configs/:id Deleting SSO configuration disables SSO for the organization. Members then fall back to password sign-in (email and password), or to a passkey where the organization has enabled passkeys as a primary factor.
OIDC Flow
Authorize
GET /v1/auth/sso/oidc/authorize Query Parameters
| Parameter | Type | Description |
|---|---|---|
config_id | UUID | SSO configuration ID (required) |
org_id | UUID | Organization ID (required) |
redirect_uri | string | Post-auth redirect URL (optional, validated against the app base URL) |
Redirects the user to the configured OIDC provider for authentication.
The redirect_uri is validated against the application base URL
to prevent open redirects.
Callback
GET /v1/auth/sso/oidc/callback OIDC provider callback. Exchanges the authorization code for tokens and creates a Backbuild session. This endpoint is called by the identity provider and should not be called directly.
Token Exchange
POST /v1/auth/sso/token-exchange
Exchanges the one-time code produced by the SSO callback for Backbuild
access and refresh tokens. This endpoint takes no request body: the
exchange code is delivered to the browser in an HttpOnly cookie set by the
OIDC callback or SAML ACS handler (this prevents code leakage via browser
history, the Referer header, analytics, or logs). The request must include
an Origin header that exactly matches the application origin
(CSRF protection).
SAML 2.0 Flow
Initiate Login
GET /v1/auth/sso/saml/login Query Parameters
| Parameter | Type | Description |
|---|---|---|
config_id | UUID | SSO configuration ID (required) |
org_id | UUID | Organization ID (required) |
redirect_uri | string | Post-auth redirect URL (optional, validated against the app base URL) |
Generates a SAML AuthnRequest and redirects the user to the identity provider’s SSO URL.
Assertion Consumer Service (ACS)
POST /v1/auth/sso/saml/acs Receives the SAML Response from the identity provider. Validates the assertion signature, extracts user attributes, and creates a Backbuild session. This endpoint is configured as the ACS URL in your IdP.
Metadata
GET /v1/auth/sso/saml/metadata/:configId?org_id=YOUR_ORGANIZATION_UUID
Returns the SAML Service Provider metadata XML for the given SSO
configuration. Replace :configId with the configuration UUID
and supply your organization UUID in the required org_id
query parameter. Provide the complete URL to your identity provider during setup.
SCIM 2.0 Provisioning
SCIM endpoints use per-organization bearer tokens (not user JWTs), which
your identity provider sends on every request. Organization SCIM tokens
cannot be created in the Backbuild app yet, so plan on single sign-on and
invitations for onboarding until token management arrives. Every user SCIM
creates must have a userName and primary email on a domain your
organization has verified under Settings → Administration → Domains
(also reachable from its single sign-on settings); any other address is refused.
List Users
GET /v1/scim/v2/Users Headers
Authorization: Bearer SCIM_ORG_TOKEN Query Parameters
| Parameter | Type | Description |
|---|---|---|
filter | string | SCIM filter expression (e.g., userName eq "user@example.com") |
count | integer | Max results per page |
startIndex | integer | 1-based pagination index |
Response
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
"totalResults": 3,
"startIndex": 1,
"itemsPerPage": 20,
"Resources": [
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": "...",
"userName": "jane@example.com",
"name": {
"givenName": "Jane",
"familyName": "Smith"
},
"emails": [
{
"value": "jane@example.com",
"primary": true
}
],
"active": true
}
]
} Create User
POST /v1/scim/v2/Users Request Body
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"userName": "newuser@example.com",
"name": {
"givenName": "New",
"familyName": "User"
},
"emails": [
{
"value": "newuser@example.com",
"primary": true
}
],
"active": true
}
Provisions a new user in the organization. If the user already has a
Backbuild account, they are added as a member. Otherwise, a new account
is created. The organization is resolved from the SCIM bearer token. This
endpoint follows the SCIM 2.0 protocol (RFC 7644), so it returns a SCIM User
resource (not the standard Backbuild envelope). The resource id is
assigned by the platform and is never supplied in the request body.
Response
Returns the full created SCIM User resource, with a Location header
pointing at the new resource.
{
"schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
"id": "...",
"userName": "newuser@example.com",
"name": {
"givenName": "New",
"familyName": "User"
},
"emails": [
{ "value": "newuser@example.com", "primary": true }
],
"active": true,
"meta": {
"resourceType": "User",
"created": "2026-04-13T10:00:00Z",
"lastModified": "2026-04-13T10:00:00Z",
"location": "/v1/scim/v2/Users/..."
}
} Response Codes
Errors follow the SCIM error schema
(urn:ietf:params:scim:api:messages:2.0:Error) with a
scimType where applicable.
| Status | Meaning |
|---|---|
201 Created | User provisioned; the full SCIM User resource is returned with a Location header |
400 Bad Request | Invalid request: malformed JSON (invalidSyntax), or a missing/invalid value such as userName or a non-conformant email (invalidValue) |
401 Unauthorized | Missing or invalid SCIM bearer token |
403 Forbidden | The SCIM token is not authorized for this operation |
409 Conflict | A user with this userName already exists (uniqueness) |
500 Internal Server Error | Unexpected server error |
Delete User
DELETE /v1/scim/v2/Users/:id Deprovisions a user from the organization. The user’s Backbuild account is not deleted; only their membership in this organization is removed.