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

# Setup SAML with Identity Providers

> This guide explains the settings you need to use to configure SAML with your Identity Provider. Once configured, obtain an XML metadata file and use it to configure SAML in Formbricks.

### SAML Registration with Identity Providers

This guide explains the settings you need to use to configure SAML with your Identity Provider. Once configured, obtain an XML metadata file and use it to configure SAML in Formbricks.

> **Note:** Please do not add a trailing slash at the end of the URLs. Create them exactly as shown below.

**Assertion consumer service URL / Single Sign-On URL / Destination URL:** [https://app.formbricks.com/api/auth/saml/callback](https://app.formbricks.com/api/auth/saml/callback)

**Entity ID / Identifier / Audience URI / Audience Restriction:** [https://saml.formbricks.com](https://saml.formbricks.com)

> **Note:** [https://saml.formbricks.com](https://saml.formbricks.com) is hardcoded in Formbricks — do not replace it with your instance URL. It is the fixed SP Entity ID and must match exactly as shown in SAML assertions.

**Response:** Signed

**Assertion Signature:** Signed

**Signature Algorithm:** RSA-SHA256

**Assertion Encryption:** Unencrypted

**NameID Format:** EmailAddress

**Application username:** email

**Mapping Attributes / Attribute Statements:**

* Name claim:

  If your IdP has a `name` claim, set the following claims to populate the name field:

  | Name | Name Format | Value     |
  | ---- | ----------- | --------- |
  | name | Basic       | user.name |

  Many IdPs do not have a `name` claim. If not, you can use different claims to populate the name field. The order of precedence is `name` -> **other options** -> `email`.

  **Other options:**

  | Name      | Name Format | Value                       |
  | --------- | ----------- | --------------------------- |
  | firstName | Basic       | **FIRST\_NAME\_EQUIVALENT** |
  | lastName  | Basic       | **LAST\_NAME\_EQUIVALENT**  |

  Refer to the table below for the different claims you can use for each IdP.

  | IdP                           | FIRST\_NAME\_EQUIVALENT           | LAST\_NAME\_EQUIVALENT            |
  | ----------------------------- | --------------------------------- | --------------------------------- |
  | Okta                          | user.firstName                    | user.lastName                     |
  | Microsoft Entra ID (Azure AD) | user.givenName                    | user.surname                      |
  | Google Workspace              | user.given\_name / user.firstName | user.family\_name / user.lastName |
  | OneLogin                      | user.FirstName / user.first\_name | user.LastName / user.last\_name   |
  | Auth0                         | user.given\_name                  | user.family\_name                 |
  | JumpCloud                     | user.firstname                    | user.lastname                     |

  Above provided claims may differ based on your configuration and the IdP you are using. Please refer to the documentation of your IdP for the correct claims.

### SAML With Okta

<Steps>
  <Step title="Create an application with your SAML provider">
    For example, in Okta, once you create an account, you can click on Applications on the sidebar menu:

    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/okta-applications.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=46e6da91380045edaae25db0aea8ec7e" width="3316" height="1732" data-path="images/development/guides/auth-and-provision/okta/okta-applications.webp" />
  </Step>

  <Step title="Click on Create App Integration">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/create-app-integration.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=2f16eff88fe23e6347c9bab40ca74e62" width="3236" height="1928" data-path="images/development/guides/auth-and-provision/okta/create-app-integration.webp" />
  </Step>

  <Step title="Select SAML 2.0 in the modal form, and click Next">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/select-saml-2.0.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=a94f3c5912cbc7bba52531adcbe8f544" width="1960" height="1188" data-path="images/development/guides/auth-and-provision/okta/select-saml-2.0.webp" />
  </Step>

  <Step title="Fill the general settings as shown and click Next">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/general-settings.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=30d459732bf280adf2014fe043b25a5f" width="2152" height="1316" data-path="images/development/guides/auth-and-provision/okta/general-settings.webp" />
  </Step>

  <Step title="Enter the SAML Integration Settings as shown and click Next">
    * **Single Sign-On URL**: `https://<your-formbricks-instance>/api/auth/saml/callback` or `http://localhost:3000/api/auth/saml/callback` (if you are running Formbricks locally)
    * **Audience URI (SP Entity ID)**: `https://saml.formbricks.com` (hardcoded; do not replace with your instance URL)

    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/saml-integration-settings.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=4f23af0c4f40522c40278ababef02414" width="1530" height="1562" data-path="images/development/guides/auth-and-provision/okta/saml-integration-settings.webp" />
  </Step>

  <Step title="Fill the fields mapping as shown and click Next">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/fields-mapping.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=599aa1b47d73e6aaac1fcab0effa718b" width="1530" height="934" data-path="images/development/guides/auth-and-provision/okta/fields-mapping.webp" />
  </Step>

  <Step title="Check the internal app checkbox and click Finish">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/internal-app.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=3ea651f570277fa24ef2a2955992fcfc" width="1560" height="624" data-path="images/development/guides/auth-and-provision/okta/internal-app.webp" />
  </Step>

  <Step title="Check that the app is created successfully">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/app-created.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=0b353256d93847b815ae093993666abd" width="2078" height="1556" data-path="images/development/guides/auth-and-provision/okta/app-created.webp" />
  </Step>

  <Step title="Click on the app and head over to the Assignments tab">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/assignments-tab.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=53babea15958867615e6e46b9694077b" width="2156" height="1496" data-path="images/development/guides/auth-and-provision/okta/assignments-tab.webp" />
  </Step>

  <Step title="Click on Assign button and select Assign to People">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/assign-to-people.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=388b1480d9a598febcd50beb9f942fad" width="2244" height="1522" data-path="images/development/guides/auth-and-provision/okta/assign-to-people.webp" />
  </Step>

  <Step title="Select the users you want to assign the app to and click Assign">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/select-users.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=6e03ececac7c157a0b786b8071645767" width="2124" height="1582" data-path="images/development/guides/auth-and-provision/okta/select-users.webp" />
  </Step>

  <Step title="Head over to the Sign On tab and click on the 'view SAML setup instructions' button">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/view-saml-instructions.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=1d6c0220d346c21e822f6d3769bec779" width="2226" height="1542" data-path="images/development/guides/auth-and-provision/okta/view-saml-instructions.webp" />
  </Step>

  <Step title="Scroll to the bottom and copy the IDP metadata">
    <img src="https://mintcdn.com/formbricks/FxVXbfRFRc8kmKdj/images/development/guides/auth-and-provision/okta/idp-metadata.webp?fit=max&auto=format&n=FxVXbfRFRc8kmKdj&q=85&s=8429210d2053be4ac88649f89a485829" width="2176" height="1884" data-path="images/development/guides/auth-and-provision/okta/idp-metadata.webp" />
  </Step>

  <Step title="Copy the IDP metadata and paste it in the `connection.xml` file in the `formbricks/saml-connection` (use `formbricks/apps/web/saml-connection` for development) directory" />
</Steps>

That's it. Now when you try to login with SSO, your application on Okta will handle the authentication.
