---
title: "SAML SSO"
icon: "user-shield"
description: "How to set up SAML SSO for Formbricks"
---

<Note>This feature is only available with the Formbricks Enterprise plan having a SAML SSO add-on.</Note>

## Overview

Formbricks supports Security Assertion Markup Language (SAML) SSO. We prioritize your ease of access and security by providing robust Single Sign-On (SSO) capabilities.

### Setting up SAML login

<Steps>
  <Step title="Create a SAML application with your Identity Provider (IdP)">
    Follow the instructions here - [SAML
    Setup](/development/guides/auth-and-provision/setup-saml-with-identity-providers)
  </Step>
  <Step title="Configure access to the IdP SAML app">
    Ensure that all users who need access to Formbricks have access to the IdP SAML app.
  </Step>
  <Step title="Retrieve XML metadata from your IdP">
    Keep the XML metadata from your IdP accessible, as you will need it later.
  </Step>
  <Step title="Set the SAML_DATABASE_URL environment variable">
    Set the `SAML_DATABASE_URL` environment variable in your `.env` file to a dedicated database for
    SAML(e.g., `postgresql://postgres:@localhost:5432/formbricks-saml`). If you're using a self-signed
    certificate for Postgres, include the `sslmode=disable` parameter.
  </Step>
  <Step title="Set the metadata">
    Create a file called `connection.xml` in the `apps/web/saml-connection` directory and paste the XML
    metadata from your IdP into it. Please create the directory if it doesn't exist. Your metadata file should start with a tag like this: `<?xml version="1.0" encoding="UTF-8"?><...>` or `<md:EntityDescriptor entityID="...">`. Please remove any extra text from the metadata.
  </Step>
  <Step title="Your users can now log into Formbricks using SAML">
    Once setup is complete, please restart the Formbricks server and your users can log into Formbricks using SAML.
  </Step>
</Steps>

<Note>
  We don't support multiple SAML connections yet. You can only have one SAML connection at a time. If you
  change the `connection.xml` file, your existing SAML connection will be overwritten.
</Note>
