Skip to main content

B2B Single Sign-On & SAML

info

Organizations are only available in Ory Network and are not supported in self-hosted Ory Kratos. If you have any questions, or if you would like more information about transitioning to Ory Network, please don't hesitate to reach out.

Organizations are a way to group users within one project. An organization always belongs to one Ory project. Within a project, an identity can belong to an organization or remain without an organization. Organizations contain multiple OIDC SSO connections. All members of an organization must use one of the organization's OIDC SSO connections to log in.

An organization can have multiple domains. Registrations for email addresses with a domain that belongs to an organization must go through one of the organization's OIDC SSO connections.

Manage organizations

To create, update, or delete organizations via the Ory Console, go to AuthenticationEnterprise SSO in the Ory Console.

Create SSO connections for an organization

After creating an organization, continue by adding one or more SSO OIDC connections.

Go to AuthenticationEnterprise SSO in the Ory Console and continue by configuring the selected organization.

SAML

SAML (Security Assertion Markup Language) is an XML-based open standard used for exchanging authentication and authorization data between parties. The SAML integration in Ory Network uses the B2B Organization feature.

SAML via Ory Network

This guide will walk you through the steps required to set up SAML Single Sign-On (SSO) with Ory Network.

Prerequisites

Before proceeding, ensure you are on a plan that supports SAML SSO. SAML is available exclusively on select Enterprise plans. Contact us if you need SAML support.

  1. Go to AuthenticationEnterprise SSO in the Ory Console to create an organization.

  2. Select "Add a new Enterprise SAML SSO connection" and follow the instructions to configure the SAML connection. Fill out the following form fields:

    • Label: A descriptive name for the SAML connection. This will be displayed to users.
    • Data mapping: A mapping from the SAML attributes to Ory's identity schema.
    • Raw IDP metadata XML: The XML metadata file from your SAML Identity Provider (IdP).
  3. Navigate to your login screen to test the SAML connection.

The SAML application callback URL to set at our SAML Identity Provider is: https://api.console.ory.sh/saml/api/oauth/saml

SAML via BoxyHQ

note

Before Ory Network had native SAML support, BoxyHQ was the recommended way to set up SAML SSO. The integration is still supported, although we recommend using the native SAML support in Ory Network for new projects.

Prerequisites

Before proceeding, ensure you have the following:

Configuration

To set up the integration, you'll need to get your Ory Network session token:

  • Install the Ory CLI on your system.
  • Run ory auth to sign into your Ory Network account.
  • Locate the session token in the .ory-cloud.json file in your home folder. This token starts with the prefix ory_st. You can use cat ~/.ory-cloud.json | grep 'ory_st' to find it.

You'll also need your Ory Project ID. You can find this in your Ory Network settings.

Next, you'll configure the session token and Project ID in BoxyHQ.

Follow these steps:

  • Log into your BoxyHQ account.
  • Create a new Product if you haven't already.
  • Navigate to Settings > Ory Integration.
  • Paste your session token and Project ID into the respective input fields and save the configuration.

Once configured, the integration between BoxyHQ and Ory Network will automatically set up a new Organization and a generic OIDC connection whenever you create a new SSO connection on BoxyHQ. All user management will then flow through Ory Network.

To verify the integration, navigate to your Ory Account Experience UI and enter an email associated with the domain you configured. If successful, the "Sign in with SSO" button should appear.