> ## 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.

# 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

> [!NOTE]
>
> Okta also supports OpenID Connect, which needs no XML metadata file on the Formbricks side. See
> [Okta OIDC](https://formbricks.com/docs/self-hosting/configuration/auth-sso/okta-oidc.md).

**1. 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:

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/okta-applications.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=b819ea31ace6ee96d0b69b329cf5c533)

**2. Click on Create App Integration**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/create-app-integration.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=7fb1ad7cad43a945f1914a67370d61e5)

**3. Select SAML 2.0 in the modal form, and click Next**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/select-saml-2.0.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=6872c92105e78444e22b5abd17232a62)

**4. Fill the general settings as shown and click Next**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/general-settings.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=fd24382ae1668ba2920a7d343f4d837c)

**5. 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)

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/saml-integration-settings.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=f14a3d8a1c85fdc7f1457f5df10c9c6e)

**6. Fill the fields mapping as shown and click Next**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/fields-mapping.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=7a2932e37d4db6b660e8eb8d7463396a)

**7. Check the internal app checkbox and click Finish**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/internal-app.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=859716e58c391c65f7a5518c10816f39)

**8. Check that the app is created successfully**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/app-created.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=f4e607c5ff977413ef9581681f332bd3)

**9. Click on the app and head over to the Assignments tab**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/assignments-tab.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=d2f9bd8223b1760719996154ad5b7f3d)

**10. Click on Assign button and select Assign to People**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/assign-to-people.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=9e85ba2a6fcdad77f90931f67f141d3e)

**11. Select the users you want to assign the app to and click Assign**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/select-users.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=a9e011d2a91055368f9af04078239855)

**12. Head over to the Sign On tab and click on the 'view SAML setup instructions' button**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/view-saml-instructions.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=8fb0116b85f57d808fdb66965588211d)

**13. Scroll to the bottom and copy the IDP metadata**

![](https://mintcdn.com/formbricks/AluoV1JcINmbRAK1/images/self-hosting/configuration/auth-sso/okta/idp-metadata.webp?fit=max\&auto=format\&n=AluoV1JcINmbRAK1\&q=85\&s=31f731c7f6ca8a317123ffd506f20079)

**14. 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**

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


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