> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Okta SSO

> Set up SAML Single Sign-On between Okta and StackOne.

export const idp_0 = "Okta"

Connect Okta as the organization's SAML 2.0 identity provider (IdP), so users sign in to StackOne with their Okta credentials.

Before setting up Okta SSO, you need:

* The **Organization Admin** role in StackOne.
* Administrator access to the **Okta Admin Console**.
* The ability to add a DNS TXT record for your email domain, which proves you own it.

## Start the connection in StackOne

<Steps>
  <Step title="Choose Okta as the provider">
    1. Go to [**Organization > Security > SSO**](https://app.stackone.com/organization/security/sso).
    2. Click **Get started**.
    3. Select **Okta** as the provider.
  </Step>

  <Step title="Name the connection and set the domain">
    On the **Connection details** step, fill in both fields:

    * **Connection name**: a name for the connection. StackOne generates the connection's unique ID from it.
    * **Domain**: the email domain your users sign in with.
  </Step>

  <Step title="Copy the Service Provider values">
    The **Configure your identity provider** step has the values you need when you create the app in Okta:

    * **ACS URL (Single sign-on URL)**: where Okta posts the SAML assertion.
    * **Audience URI (SP Entity ID)**: identifies StackOne to Okta.
    * **Default RelayState**: the dashboard URL, where an IdP-initiated sign-in lands.

    <Note>
      Keep this StackOne tab open. You return to the wizard to register the provider after you build the Okta app.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/stackone-60/z6bSbDsMY4CzvXKv/images/secure/identity-and-access/authentication/sso/sso-configure.png?fit=max&auto=format&n=z6bSbDsMY4CzvXKv&q=85&s=3c0ece55474bc1766d881c92a885bd1c" alt="StackOne Configure step showing the ACS URL and SP Entity ID to copy into Okta" style={{ maxWidth: "360px" }} width="862" height="1400" data-path="images/secure/identity-and-access/authentication/sso/sso-configure.png" />
    </Frame>
  </Step>
</Steps>

## Create the SAML app in Okta

<Steps>
  <Step title="Create a SAML app integration">
    1. In the **Okta Admin Console**, go to **Applications > Applications**.
    2. Click **Create App Integration**.
    3. Choose **SAML 2.0**.
    4. Click **Next**.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/ZC4YWqkzLcgSAzHk/images/guides/sso-okta-create-app.png?fit=max&auto=format&n=ZC4YWqkzLcgSAzHk&q=85&s=86bf9313103131062980572136ed3167" alt="Okta Create App Integration dialog with SAML 2.0 selected" width="977" height="580" data-path="images/guides/sso-okta-create-app.png" />
    </Frame>
  </Step>

  <Step title="Name the app">
    1. On **General Settings**, enter an **App name**, for example `StackOne SSO`.
    2. Click **Next**.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/ZC4YWqkzLcgSAzHk/images/guides/sso-okta-general-settings.png?fit=max&auto=format&n=ZC4YWqkzLcgSAzHk&q=85&s=f774d9b9fedebf6519861a8a5da1d66e" alt="Okta general settings page with the app named StackOne SSO" width="1083" height="620" data-path="images/guides/sso-okta-general-settings.png" />
    </Frame>
  </Step>

  <Step title="Enter the SAML settings">
    In **Configure SAML**, set the following:

    * **Single sign-on URL**: the **ACS URL** from StackOne.
    * **Audience URI (SP Entity ID)**: the **SP Entity ID** from StackOne.
    * **Default RelayState**: the **Default RelayState** from StackOne.
    * **Name ID format**: `EmailAddress`.
    * **Application username**: `Email`.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/kTFEJ4y8SKJHArug/images/guides/sso-okta-saml-settings.png?fit=max&auto=format&n=kTFEJ4y8SKJHArug&q=85&s=eedd7c9f495054e1da89488683bfaaba" alt="Okta SAML settings filled with the StackOne ACS URL, Audience URI, EmailAddress Name ID, and Email username" width="747" height="632" data-path="images/guides/sso-okta-saml-settings.png" />
    </Frame>
  </Step>

  <Step title="Add name attribute statements">
    1. Further down the same **Configure SAML** screen, under **Attribute Statements (optional)**, add two attributes:

       | Name | Name format | Value |
       | - | - | - |
       | `givenName` | `Unspecified` | `user.firstName` |
       | `surname` | `Unspecified` | `user.lastName` |

       These set the user's display name in StackOne.
    2. Click **Next**.
    3. Click **Finish**.

    <Note>
      Adding these to an existing app only sets names for new users. To sync names for existing users, use [SCIM Provisioning](/secure/identity-and-access/manage-team/scim/okta).
    </Note>
  </Step>

  <Step title="Assign users">
    1. Open the **Assignments** tab.
    2. Assign the people or groups who should sign in to StackOne through Okta.

    Only assigned users can complete SSO.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/ZC4YWqkzLcgSAzHk/images/guides/sso-okta-assign-users.png?fit=max&auto=format&n=ZC4YWqkzLcgSAzHk&q=85&s=ad0d8598d3b0282569f44e1030f6f3de" alt="Okta Assignments tab for adding users to the StackOne SSO application" width="760" height="702" data-path="images/guides/sso-okta-assign-users.png" />
    </Frame>
  </Step>

  <Step title="Get the identity provider metadata">
    Open the app's **Sign On** tab, then get the values StackOne needs.

    <Tabs>
      <Tab title="Metadata XML">
        Download the **Identity Provider metadata** XML.
      </Tab>

      <Tab title="Manual values">
        1. In the **SAML Setup** panel, click **View SAML setup instructions**.
        2. Copy these values for StackOne:
           * **Identity Provider Issuer**: the Entity ID, for example `http://www.okta.com/exk...`.
           * **Identity Provider Single Sign-On URL**: Okta's login endpoint.
           * **X.509 Certificate**: the signing certificate in PEM format.

        <Frame>
          <img src="https://mintcdn.com/stackone-60/ZC4YWqkzLcgSAzHk/images/guides/sso-okta-idp-metadata.png?fit=max&auto=format&n=ZC4YWqkzLcgSAzHk&q=85&s=cddc946ef7306aaf10aa8492c5121920" alt="Okta Sign On tab showing the Identity Provider Issuer, SSO URL, and X.509 certificate" width="1033" height="827" data-path="images/guides/sso-okta-idp-metadata.png" />
        </Frame>
      </Tab>
    </Tabs>
  </Step>
</Steps>

## Register the provider in StackOne

Switch back to the StackOne tab and continue to the **Register your SSO provider** step.

<Steps>
  <Step title="Provide the Okta values">
    Supply the three values from Okta.

    <Tabs>
      <Tab title="Metadata XML">
        1. Click **Upload SAML metadata file**.
        2. Select the **Identity Provider metadata** XML you downloaded from Okta. StackOne fills in **Entity ID (Issuer)**, **SSO URL (Entry Point)**, and **X.509 Certificate**.
        3. Review the imported values before continuing.

        <Frame>
          <img src="https://mintcdn.com/stackone-60/z6bSbDsMY4CzvXKv/images/secure/identity-and-access/authentication/sso/sso-register.png?fit=max&auto=format&n=z6bSbDsMY4CzvXKv&q=85&s=8a184481b362bddb595660cffe2e4ce8" alt="StackOne Register step with the metadata upload option above the manual entry fields" style={{ maxWidth: "360px" }} width="952" height="1278" data-path="images/secure/identity-and-access/authentication/sso/sso-register.png" />
        </Frame>
      </Tab>

      <Tab title="Manual values">
        Set the following:

        * **Entity ID (Issuer)**: the **Identity Provider Issuer** from Okta.
        * **SSO URL (Entry Point)**: the **Identity Provider Single Sign-On URL** from Okta.
        * **X.509 Certificate**: the **X.509 Certificate** from Okta.

        <Frame>
          <img src="https://mintcdn.com/stackone-60/z6bSbDsMY4CzvXKv/images/secure/identity-and-access/authentication/sso/sso-register-filled.png?fit=max&auto=format&n=z6bSbDsMY4CzvXKv&q=85&s=d9e842acf91bace5237e148767ddb808" alt="StackOne Register form completed with the Okta issuer, SSO URL, and certificate" style={{ maxWidth: "360px" }} width="952" height="1250" data-path="images/secure/identity-and-access/authentication/sso/sso-register-filled.png" />
        </Frame>
      </Tab>
    </Tabs>
  </Step>

  <Step title="Register the connection">
    Select **Continue**. The connection is registered, but stays inactive until the domain is verified.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/z6bSbDsMY4CzvXKv/images/secure/identity-and-access/authentication/sso/sso-connection-pending.png?fit=max&auto=format&n=z6bSbDsMY4CzvXKv&q=85&s=0ccd81a427a7fbf943f3dee67ae2d26c" alt="StackOne SSO connection card showing configuration details and pending domain verification" width="1568" height="716" data-path="images/secure/identity-and-access/authentication/sso/sso-connection-pending.png" />
    </Frame>
  </Step>
</Steps>

## Verify the domain

Verification proves the organization owns the domain and activates SSO. Once it's verified, existing StackOne users on the domain are linked to the SSO connection, so they keep one account.

<Steps>
  <Step title="Copy the DNS TXT record">
    On the wizard's **Verify your domain** step, copy the record's **Name** and **Value**. The **Value** has this form:

    ```
    _stackone-sso-verification-token-{providerId}={token}
    ```

    <Frame>
      <img src="https://mintcdn.com/stackone-60/z6bSbDsMY4CzvXKv/images/secure/identity-and-access/authentication/sso/sso-verify-domain.png?fit=max&auto=format&n=z6bSbDsMY4CzvXKv&q=85&s=9b7b1f0ab83e666df9083f1c859b250e" alt="StackOne's Verify your domain step showing the DNS TXT record name and value." width="1028" height="822" data-path="images/secure/identity-and-access/authentication/sso/sso-verify-domain.png" />
    </Frame>
  </Step>

  <Step title="Add the record to DNS">
    In the domain's DNS panel, add a TXT record:

    * **Name/Host**: the domain. Use `@` if it's the root of the DNS zone, or the subdomain label if the email domain is a subdomain.
    * **Value**: the full `_stackone-sso-verification-token-...` string, as its own value. Don't append it to an existing TXT value, such as an SPF record.

    <Warning>
      Add the `_stackone-sso-verification-token-...` string as the record's **Value**, not its Name. It looks like a DNS host label, as `_dmarc` and `_domainkey` do, so it's easy to paste into **Name/Host** by mistake. A record on the wrong name fails verification without an error.
    </Warning>

    <Accordion title="Add the record in common DNS providers">
      <Tabs>
        <Tab title="Cloudflare">
          1. Go to **DNS > Records** and select **Add record**.
          2. Set **Type** to `TXT` and **Name** to `@` for the root domain, or the subdomain label, such as `eu` for `eu.acme.com`.
          3. Paste the token into **Content**.

          Cloudflare allows several TXT records at the same name, so add a new record rather than editing an existing one.
        </Tab>

        <Tab title="AWS Route 53">
          1. Open the hosted zone and select **Create record**.
          2. Set **Record type** to `TXT`. Leave **Record name** blank for the root domain, or enter the subdomain label, such as `eu` for `eu.acme.com`.
          3. Paste the token in quotes.

          If a TXT record already exists at that name, edit it and add the token as a new line instead.
        </Tab>

        <Tab title="Google Cloud DNS">
          1. Open the zone and add a standard record set.
          2. Set the type to `TXT`, with the DNS name set to the email domain, such as `acme.com` or `eu.acme.com`.
          3. Paste the token.

          If a TXT record set already exists, edit it and add the token as a new item instead.
        </Tab>

        <Tab title="GoDaddy">
          1. Open the domain's DNS records and select **Add New Record**.
          2. Set **Type** to `TXT` and **Name** to `@` for the root domain, or the subdomain label, such as `eu` for `eu.acme.com`.
          3. Paste the token into **Value**.
        </Tab>

        <Tab title="Namecheap">
          1. Open **Advanced DNS** and select **Add New Record**.
          2. Choose **TXT Record**, and set **Host** to `@` for the root domain, or the subdomain label, such as `eu` for `eu.acme.com`.
          3. Paste the token into **Value**.
        </Tab>
      </Tabs>
    </Accordion>

    <Note>
      DNS changes can take up to 48 hours to propagate, though they often complete within minutes. Check what's publicly visible with [Google Admin Toolbox Dig](https://toolbox.googleapps.com/apps/dig/#TXT/).
    </Note>
  </Step>

  <Step title="Verify in StackOne">
    1. Select **Verify**. Once the record is visible, the domain is verified and SSO is active.
    2. Select **Finish** to close the wizard.

    If the check fails, wait for DNS to propagate and try again.

    <Note>
      To finish setup first, select **Verify Later**, then verify afterward from the **Trusted Domain** card on the connection's **General** tab.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/stackone-60/z6bSbDsMY4CzvXKv/images/secure/identity-and-access/authentication/sso/sso-connection-verified.png?fit=max&auto=format&n=z6bSbDsMY4CzvXKv&q=85&s=5b06e7048c8c6faf0c51e2221e4c16f2" alt="StackOne SSO connection card showing the domain as verified and SSO active" width="1568" height="716" data-path="images/secure/identity-and-access/authentication/sso/sso-connection-verified.png" />
    </Frame>
  </Step>
</Steps>

## Manage the connection

Open the connection from [**Organization > Security > SSO**](https://app.stackone.com/organization/security/sso). The **General** tab is where you maintain it after setup:

* Select **Edit SAML** to update the identity provider values, either by uploading new metadata XML or by editing the **Entity ID (Issuer)**, **SSO URL (Entry Point)**, and **X.509 Certificate** directly.
* Select **Edit Domain** to change the trusted domain. Changing it resets verification, so users stop being redirected until you verify it again. You can't change it while SSO is enforced.

<Frame>
  <img src="https://mintcdn.com/stackone-60/z6bSbDsMY4CzvXKv/images/secure/identity-and-access/authentication/sso/sso-connection-general.png?fit=max&auto=format&n=z6bSbDsMY4CzvXKv&q=85&s=5c5aa471ae3d123dc2f76a56cebe9e20" alt="The connection's General tab, showing the SAML 2.0 Configuration values (Single sign-on URL, Audience URI, Default Relay State) and the Trusted Domain verification status." width="1568" height="716" data-path="images/secure/identity-and-access/authentication/sso/sso-connection-general.png" />
</Frame>

From the connection's page header:

* **Settings** edits the **Connection name**. The **Provider ID** is generated at setup and can't be changed.
* **Delete** removes the SSO connection. It's disabled while SSO is enforced, so turn off enforcement on the **Authentication** tab first.

To require users to sign in through {idp_0}, see [Require SSO](/secure/identity-and-access/authentication/sso/overview#require-sso).

<Warning>
  Deleting the connection sends users on the domain back to email and password sign-in, so make sure they have another way in first. To change SAML values, use **Edit SAML** instead.

  Deleting it also removes SCIM Provisioning, if linked, and revokes its token. Provisioning from {idp_0} then fails with `401` until you link SCIM again and paste the new token into {idp_0}. Users already provisioned keep their access.
</Warning>

<Tip>
  To add, update and deactivate users automatically from Okta, set up [Okta SCIM Provisioning](/secure/identity-and-access/manage-team/scim/okta) once the domain is verified.
</Tip>

## Troubleshooting

| Symptom | Likely cause | Fix |
| - | - | - |
| `ERROR_UNMATCH_CERTIFICATE_DECLARATION_IN_METADATA` | The registered certificate doesn't match the one Okta signs with. Okta issues a new certificate per app. | Re-copy the **X.509 Certificate** from this app's **View SAML setup instructions** and update it via **Edit SAML**. |
| `ERR_UNMATCH_ISSUER` | The **Entity ID (Issuer)** doesn't match the issuer Okta sends. | Copy the **Identity Provider Issuer** (`http://www.okta.com/exk...`) and update it via **Edit SAML**. |
| "Provider domain has not been verified" | Domain verification hasn't completed. | Finish [Verify the domain](#verify-the-domain). |
| Sign-in redirects to the wrong Okta, or a domain appears already taken | StackOne doesn't automatically reserve a domain to one organization, so another StackOne organization may have registered the same domain. | Contact StackOne support to resolve which organization should own SSO for the domain before you enforce it. |
| Verification keeps failing | The TXT record is on the wrong name, not its own value, or DNS hasn't propagated. | Use `@` for a root domain or the subdomain label otherwise, add the token as its own TXT value, and check propagation with [Dig](https://toolbox.googleapps.com/apps/dig/#TXT/). |
| Users not redirected to Okta | The domain isn't verified, or the user isn't assigned in Okta. | Verify the domain, and confirm the user is on the app's **Assignments** tab. |
| New users show their email address as their name | The app sends no name attribute statements, so the assertion carries only the email subject. | Add the `givenName` / `surname` attribute statements to the Okta app (see the setup steps above). |
| `403 Forbidden` when opening SSO | You lack the **Organization Admin** role. | Ask an **Organization Admin** to make the change or to grant you the role. |

## Next steps

<CardGroup cols={2}>
  <Card title="Single Sign-On" icon="book-open" href="/secure/identity-and-access/authentication/sso/overview">
    How SSO, domain verification, and SCIM Provisioning fit together.
  </Card>

  <Card title="Microsoft Entra SSO" icon="https://stackone-logos.com/api/microsoft-entra/filled/svg" href="/secure/identity-and-access/authentication/sso/microsoft-entra">
    Set up SAML SSO with Entra ID instead of Okta.
  </Card>

  <Card title="Generic SAML SSO" icon="shield-halved" href="/secure/identity-and-access/authentication/sso/saml-generic">
    Connect any SAML 2.0 identity provider.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.