iam.sso-connections.create

Connect an OIDC or SAML identity provider (created switched off)

POST /iam/api/sso-connectionsIAM iam:CreateSsoConnectionChanges state

The OIDC client secret is stored encrypted and never returned. A connection signs nobody in until a domain is verified and it is enabled

Request syntax

POST /iam/api/sso-connections
{
  "protocol": "enum",
  "name": "string",
  "defaultRole": "enum",
  "oidc": "object",
  "saml": "object"
}

Request body

The body takes one of several shapes (oidc, saml); the server decides which combination of fields is valid.

  • protocolRequired

    enum

    Selects which of the other fields apply

    One of: oidc, saml

  • nameOptional

    string

    A name for the connection, e.g. the identity provider’s

    Constraints: 1-100 chars

  • defaultRoleOptional

    enum

    The organization role a person gets when single sign-on first adds them; default member

    One of: admin, member, viewer, billing

  • oidcOptional

    object

    For protocol oidc: {issuer, clientId, clientSecret} of the app registered at the identity provider

    Constraints: JSON

  • samlOptional

    object

    For protocol saml: {idpSsoUrl (https), idpEntityId, idpCertificate (PEM), allowSha1 (default false)} from the identity provider

    Constraints: JSON

Response

201 with the new connection as get describes it: enabled false, no domains yet, and serviceProvider holding the values to enter at the identity provider.

A JSON response is wrapped as { "success": true, "data": … }; the CLI prints the whole body with --json.

Errors

  • 400The request does not pass the schema above. The body is { "error": …, "issues": […] }, one issue per field.
  • 401No credentials, or an access key that is unknown, revoked or expired.
  • 403The caller's policies do not allow iam:CreateSsoConnection on this resource. The body names the action and the resource, and the refusal is recorded in the audit log.
  • 404The resource does not exist in your organization.

Examples

The required parameters only, with example values. Replace id and the other placeholders with your own.

dcloud iam sso-connections create --protocol oidc

Generated from the API description, the same one the API checks requests against and the CLI is built from. MCP tool: dcloud_iam_sso-connections_create.