SAML Connections (Beta)

A SAML Connection holds configuration data required for facilitating a SAML flow between your Clerk Instance (SP) and a particular SAML IdP.

Get a list of SAML Connections for an instance

This request returns the list of SAML Connections for an instance. Results can be paginated using the optional limit and offset query parameters. The SAML Connections are ordered by descending creation date and the most recent will be returned first.

Note: This is a Private Beta feature and it is currently hidden behind a feature flag. Reach out to us via Intercom to try it out.

SecuritybearerAuth
Request
query Parameters
limit
number [ 1 .. 500 ]
Default: 10

Applies a limit to the number of results returned. Can be used for paginating the results together with offset. Must be an integer greater than zero and less than 500. By default, if not supplied, a limit of 10 is used.

offset
number >= 0
Default: 0

Skip the first offset results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with limit.

Responses
200

A list of SAML Connections

402

Payment required

403

Authorization invalid

422

Invalid request parameters

get/saml_connections
Response samples
application/json
{
  • "data": [
    ],
  • "total_count": 0
}

Create a SAML Connection

Creates a new SAML Connection.

Note: This is a Private Beta feature and it is currently hidden behind a feature flag. Reach out to us via Intercom to try it out.

SecuritybearerAuth
Request
Request Body schema: application/json
name
required
string

The name to use as a label for this SAML Connection

domain
required
string

The domain of your organization. Sign in flows using an email with this domain, will use this SAML Connection.

idp_entity_id
string or null

The Entity ID as provided by the IdP

idp_sso_url
string or null

The Single-Sign On URL as provided by the IdP

idp_certificate
string or null

The X.509 certificate as provided by the IdP

Responses
200

A SAML Connection

402

Payment required

403

Authorization invalid

422

Invalid request parameters

post/saml_connections
Request samples
application/json
{
  • "name": "string",
  • "domain": "string",
  • "idp_entity_id": "string",
  • "idp_sso_url": "string",
  • "idp_certificate": "string"
}
Response samples
application/json
{
  • "object": "saml_connection",
  • "id": "string",
  • "name": "string",
  • "domain": "string",
  • "idp_entity_id": "string",
  • "idp_sso_url": "string",
  • "idp_certificate": "string",
  • "acs_url": "string",
  • "sp_entity_id": "string",
  • "active": true,
  • "provider": "string",
  • "user_count": 0,
  • "sync_user_attributes": true,
  • "created_at": 0,
  • "updated_at": 0
}

Retrieve a SAML Connection by ID

Fetches the SAML Connection whose ID matches the provided id in the path.

Note: This is a Private Beta feature and it is currently hidden behind a feature flag. Reach out to us via Intercom to try it out.

SecuritybearerAuth
Request
path Parameters
saml_connection_id
required
string

The ID of the SAML Connection

Responses
200

A SAML Connection

402

Payment required

403

Authorization invalid

404

Resource not found

get/saml_connections/{saml_connection_id}
Response samples
application/json
{
  • "object": "saml_connection",
  • "id": "string",
  • "name": "string",
  • "domain": "string",
  • "idp_entity_id": "string",
  • "idp_sso_url": "string",
  • "idp_certificate": "string",
  • "acs_url": "string",
  • "sp_entity_id": "string",
  • "active": true,
  • "provider": "string",
  • "user_count": 0,
  • "sync_user_attributes": true,
  • "created_at": 0,
  • "updated_at": 0
}

Update a SAML Connection

Updates an existing SAML Connection

Note: This is a Private Beta feature and it is currently hidden behind a feature flag. Reach out to us via Intercom to try it out.

SecuritybearerAuth
Request
path Parameters
saml_connection_id
required
string

The ID of the SAML Connection to update

Request Body schema: application/json
required
name
string or null

The name of the new SAML Connection

domain
string or null

The domain to use for the new SAML Connection

idp_entity_id
string or null

The entity id as provided by the IdP

idp_sso_url
string or null

The SSO url as provided by the IdP

idp_certificate
string or null

The x509 certificated as provided by the IdP

active
boolean or null

Activate or de-activate the SAML Connection

sync_user_attributes
boolean or null

Controls whether to update the user's attributes in each sign-in

Responses
200

A SAML Connection

402

Payment required

403

Authorization invalid

404

Resource not found

422

Invalid request parameters

patch/saml_connections/{saml_connection_id}
Request samples
application/json
{
  • "name": "string",
  • "domain": "string",
  • "idp_entity_id": "string",
  • "idp_sso_url": "string",
  • "idp_certificate": "string",
  • "active": true,
  • "sync_user_attributes": true
}
Response samples
application/json
{
  • "object": "saml_connection",
  • "id": "string",
  • "name": "string",
  • "domain": "string",
  • "idp_entity_id": "string",
  • "idp_sso_url": "string",
  • "idp_certificate": "string",
  • "acs_url": "string",
  • "sp_entity_id": "string",
  • "active": true,
  • "provider": "string",
  • "user_count": 0,
  • "sync_user_attributes": true,
  • "created_at": 0,
  • "updated_at": 0
}

Delete a SAML Connection

Deletes the given SAML Connection.

Note: This is a Private Beta feature and it is currently hidden behind a feature flag. Reach out to us via Intercom to try it out.

SecuritybearerAuth
Request
path Parameters
saml_connection_id
required
string

The ID of the SAML Connection to delete

Responses
200

Deleted Object

402

Payment required

403

Authorization invalid

404

Resource not found

delete/saml_connections/{saml_connection_id}
Response samples
application/json
{
  • "object": "string",
  • "id": "string",
  • "slug": "string",
  • "deleted": true
}