New Ory Agent Security is now live! Claim your complimentary test drive. Get Started!

Skip to main content

Setup Links for Ory Polis

The Setup link is used to create a shareable link that can be used to create an SSO Connection without exposing any sensitive information. Let's go through the steps to create a new Setup link

You can create a new Setup link for SSO from the Connections page using New Setup Link button

connections page

Another way is to go to the Setup Links section under Enterprise SSO menu and Click on Create New/New Setup Link button

setup link list empty

The create Setup Link for SSO page looks like below

create setup link page

Once the link is created you can see the the link info section at the bottom

link created

You can copy the link by clicking on the Copy button

link copied

You can regenerate the link by clicking on Regenerate button

link regenerate

Once you confirm Regenerate action you will see the new setup link in the link info section

link regenerated

Regenerating issues a new URL and invalidates the previous one straight away. Share the new link with whoever is setting up the connection: a URL copied from the link info section earlier no longer opens the setup page.

Setup links expire, three days after creation by default. Creating a setup link for a tenant and product whose link has already expired renews it, and renewal behaves like regenerating — you get a new URL, and the expired one stays invalid.

The same applies to the /api/v1/sso/setuplinks endpoint: it returns the current link unchanged while that link is still valid, and issues a new URL when you pass regenerate: true or when the existing link has expired.

Requests to POST /api/v1/sso/setuplinks for the same tenant and product that arrive at the same time, whether they create, renew or regenerate the link, issue one link, and every request receives that link. A request that cannot read the link another request is issuing yet is rejected with a 409; retry it to receive the link. So is a request that asks for an acsUrlId other than the one a concurrent request set.

To read or delete a link through /api/v1/sso/setuplinks, pass its id, or the tenant and product it was created for. A request with neither is rejected with a 400, and so is a GET /api/v1/sso/setuplinks/product request without a product.

You can perform ACTIONS like Copy, View, Regenerate & Delete from this page​

Regenerate

link regenerate from list

Delete

link delete

When you open the setup link you will land on the SSO Connection create section as there are no connections to show.

setup link sso setup

You can create a SSO Connection by filling the details.

setup link sso oidc

The person setting up the connection provides only their Identity Provider's details: the SAML metadata and the Force Authentication setting, or the OIDC client ID, client secret, discovery URL and metadata. The tenant, product, name, description and redirect URLs come from the setup link, and any other connection setting in the request is ignored.

By default, a connection created through a setup link uses the deployment's ACS URL. The person holding the link cannot choose another one.

Give connections their own ACS URL​

When ACS_URL_HOST is configured, the create Setup Link page offers to give the SAML connections created through the link their own ACS URL. Ticking it fills in a random ACS URL ID; keep it or type your own: 4 to 64 letters, digits, ., _, ~ or -. The link info section then shows the ACS URL, and the setup link's instructions show it, and a matching SP metadata link, in place of the deployment's, so the IdP is configured with it before the connection exists. Every SAML connection created through the link gets that acsUrlId. See Per-connection ACS URLs.

The ID belongs to the link for good: regenerating or renewing the link keeps it, so an IdP configured from the link keeps working, and it cannot be changed. To use a different one, delete the link and create a new one. To add one to an active link that has none, regenerate the link with it; this issues a new URL, so the setup restarts from the new link's instructions. Deleting a link does not affect the connections created through it; they keep their ACS URL.

Through the API, pass acsUrlId to POST /api/v1/sso/setuplinks. It is rejected with a 400 when ACS_URL_HOST is not configured. The response includes the link's acsUrlId and acsUrl.

If a connection of another tenant or product already uses the same IdP entity ID under the same ACS URL ID, creating the connection through the link fails with a 409. Connections created through the same link with the same IdP update each other instead, as they do without an ACS URL ID.

A setup link reaches only the SSO connections of its own tenant and product. Opening a connection of another tenant or product fails with a 400 and Tenant/Product mismatch. A Directory Sync setup link cannot be used on these pages, and fails with a 403. An expired link fails with a 401, and an unknown one with a 404.

The person holding the link never sees a client secret: neither the connection's own client secret nor the OIDC provider's. To change the OIDC client secret, type a new one when editing the connection. Leave the field blank to keep the current secret.

The setup link pages call these routes. The token in the path authorizes the request, and every route answers an error as { "error": { "message": "..." } }.

RouteResponse
GET /api/setup/{token}200 with the link's details in data, without its tenant and product
GET /api/setup/{token}/sso-connection200 with an array of the link's connections: clientID, name, deactivated, forceAuthn and the provider's name
POST /api/setup/{token}/sso-connection201 with the new connection, in the same form, in data
PATCH /api/setup/{token}/sso-connection204. The body names the connection by clientID
DELETE /api/setup/{token}/sso-connection?clientID={clientID}200 with data set to null
GET /api/setup/{token}/sso-connection/{clientID}200 with a one-item array holding the connection's Identity Provider settings, without client secrets
GET /api/setup/{token}/sso-connection/idp-entityid200 with the link's IdP entity ID in data.idpEntityID

As you can see that setup link makes it super easy & safe to create SSO Connections.