---
title: "Create SSO connection"
method: POST
path: "/api/v1/sso"
tags: ["Single Sign-On"]
---

# Create SSO connection

`POST /api/v1/sso`

## Request body

- object
  - `name` string — Name of connection
  - `label` string — An internal label to identify the connection
  - `description` string — A short description for the connection not more than 100 characters
  - `encodedRawMetadata` string — Base64 encoding of the XML metadata
  - `rawMetadata` string — Raw XML metadata
  - `metadataUrl` string — URL containing raw XML metadata
  - `defaultRedirectUrl` string, required — The redirect URL to use in the IdP login flow
  - `redirectUrl` string[], required — JSON encoded array containing a list of allowed redirect URLs
  - `tenant` string, required — Tenant
  - `product` string, required — Product
  - `oidcDiscoveryUrl` string — well-known URL where the OpenID Provider configuration is exposed
  - `oidcMetadata` string — metadata (JSON) for the OpenID Provider in the absence of discoveryUrl
  - `oidcClientId` string — clientId of the application set up on the OpenID Provider
  - `oidcClientSecret` string — clientSecret of the application set up on the OpenID Provider
  - `sortOrder` number — Indicate the position of the connection in the IdP selection screen
  - `acsUrlOverride` string — Override the global ACS URL on a per connection basis
  - `samlAudienceOverride` string — Override the global SAML Audience on a per connection basis
  - `forceAuthn` boolean — Require a new authentication instead of reusing an existing session.

## Response `200`

Success

- Connection
  - `clientID` string — Connection clientID
  - `clientSecret` string — Connection clientSecret
  - `name` string — Connection name
  - `label` string — Connection label
  - `description` string — Connection description
  - `redirectUrl` string[] — A list of allowed redirect URLs
  - `defaultRedirectUrl` string — The redirect URL to use in the IdP login flow
  - `tenant` string — Connection tenant
  - `product` string — Connection product
  - `idpMetadata` object — SAML IdP metadata
  - `oidcProvider` object — OIDC IdP metadata
  - `deactivated` boolean — Connection status
  - `sortOrder` number — Connection sort order
  - `acsUrlOverride` string — Override the global ACS URL on a per connection basis
  - `samlAudienceOverride` string — Override the global SAML Audience on a per connection basis

## Other responses

- `400` — unresolved $ref
- `401` — Unauthorized

---

[API](https://skmtc.net/ory/apis/enterprise-sso-directory-sync.md) · [All operations](https://skmtc.net/ory/apis/enterprise-sso-directory-sync/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ory/enterprise-sso-directory-sync/revisions/d92c991ace28/schema)
