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

# SAML Single Sign-on

> Setting up single sign-on for your Softr app.

<Note>SAML Single Sign-on (SSO) is available for users on the [Enterprise plan](https://www.softr.io/pricing).</Note>

<Frame caption="Single Sign-On block">
  <img src="https://mintcdn.com/softr-2b8a27e1/XiQC0e0h2Y_rNjKb/add-and-manage-users/images/saml-single-sign-on/image1.png?fit=max&auto=format&n=XiQC0e0h2Y_rNjKb&q=85&s=4ad0f866afd25fd34292c05e1fba4363" alt="Single Sign-On block" width="1002" height="786" data-path="add-and-manage-users/images/saml-single-sign-on/image1.png" />
</Frame>

To be able to configure and use the block, you first need to setup SAML for your Softr app. We’ll learn what SAML is and how to configure it for Softr shortly, but let’s first get familiar with block settings.

Under the **Features** tab in block settings, you can customize the Logo, Title, and Background Image of the signin block.

<Frame caption="Logo, Title, and Background Image settings">
  <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image2.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=08c2b5612303a41cd40e2cea307ca398" alt="Logo, Title, and Background Image settings" width="930" height="1046" data-path="add-and-manage-users/images/saml-single-sign-on/image2.png" />
</Frame>

Next, you can enable [Domain-based signup](/add-and-manage-users/pxnkp9H3qyEVMF6XUceqnj/signup-form/tPe3uxmdcUNeFYuaLTR1o9) and customize the **login button text**. Finally, there's an option to set **which page the user should be taken to** after successfully signing in.

## ****Single Sign-On Configuration****

In this section, we'll go through the steps of setting up **SAML (Security Assertion Markup Language)** for your Softr app. SAML is an open standard that allows **identity providers (IdP)** to pass authorization credentials to **service providers (SP)**, so that users can use a single set of credentials to log into different SPs. In this case your Softr app is the **SP**, and you need to connect it to an IdP to implement **Single Sign-On (SSO)** on your Softr app. There are several IdP services (e.g. Azure, Okta, Box) that you can use, but here we'll demonstrate the setup flow using [OneLogin](https://www.onelogin.com/). So, let's start.

<Steps>
  <Step title="Creating an Application on IdP">
    From the OneLogin dashboard, we are going to navigate to **Applications** and click **Add App**.

    <Frame caption="Adding an application">
      <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image3.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=f519a8a1022780cadc6c0288feeafd34" alt="Adding an application" width="2630" height="752" data-path="add-and-manage-users/images/saml-single-sign-on/image3.png" />
    </Frame>

    In the list that opens next, search for "saml test connector," select it, and create the application.

    <Frame caption="SAML Test Connector">
      <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image4.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=4d525d6e6898737c34b34cfd5e7d23a4" alt="SAML Test Connector" width="2580" height="1002" data-path="add-and-manage-users/images/saml-single-sign-on/image4.png" />
    </Frame>
  </Step>

  <Step title="Configuring the Application">
    In the Application settings, we are going to navigate to **Configuration** and fill in the following fields:

    * **Audience (EntityID)**

    * **Recipient**

    * **ACS (Consumer) URL Validator**

    * **ACS (Consumer) URL**

    To do this, you need to navigate to your Softr app's **Settings => SAML Integration**. From there, copy the **ACS URL** and paste into **Recipient** and **ACS (Consumer) URL\*** fields as well as copy the **Audience URL** and paste into the **Audience (EntityID)** field. In the **ACS (Consumer) URL Validator** field, just add "**.\***".

    <Frame caption="SAML Settings in your Softr app">
      <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image5.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=45e39fde093a7f789fa32f04ba11a4ec" alt="SAML Settings in your Softr app" width="918" height="1146" data-path="add-and-manage-users/images/saml-single-sign-on/image5.png" />
    </Frame>

    So, the **ACS URL** is basically your application SAML URL, while the **Audience URL** is a unique identifier that allows the IdP to identify the SP. Eventually, your setup should look similar to what's shown below.

    <Frame caption="Configuration section setup">
      <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image6.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=5c790777a52ea5099865dbd338ab5425" alt="Configuration section setup" width="2446" height="1044" data-path="add-and-manage-users/images/saml-single-sign-on/image6.png" />
    </Frame>
  </Step>

  <Step title="Configuring Application Parameters">
    As soon as you're done with the **Configuration** section, navigate to application's **Parameters**, where you need to create the **Email**, **First Name**, and **Last Name** fields. In the pop-up that opens after clicking the Create button, you need to add the field name (can be anything) and check the **Include in SAML assertion** flag.

    <Frame caption="New field">
      <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image7.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=de2507c1e9904b0eaf437ce8c86a77ac" alt="New field" width="1204" height="988" data-path="add-and-manage-users/images/saml-single-sign-on/image7.png" />
    </Frame>

    Then hit **Save** and choose the field's value ("Email," "First Name," or "Last Name" depending on which one you're configuring).

    <Frame caption="Field's Value">
      <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image8.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=7d968bb3b0c048b9ff1d74ac6afd762c" alt="Field's Value" width="1210" height="1010" data-path="add-and-manage-users/images/saml-single-sign-on/image8.png" />
    </Frame>

    In the screenshot below, we already have all the three fields added.

    <Frame caption="Field added">
      <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image9.png?fit=max&auto=format&n=VxMjh5thxtybPdCf&q=85&s=31b27f55b9e19322c0b62819cdb25cc7" alt="Field added" width="2488" height="1080" data-path="add-and-manage-users/images/saml-single-sign-on/image9.png" />
    </Frame>
  </Step>

  <Step title="Getting the Metadata XML">
    Further on, navigate to the **SSO** section and copy the **Issuer URL**. As soon as you paste it in the browser address bar, it will download a metadata XML file, which we are going to use in the next step.

    <Frame caption="Issuer URL">
      <img src="https://mintcdn.com/softr-2b8a27e1/XiQC0e0h2Y_rNjKb/add-and-manage-users/images/saml-single-sign-on/image10.png?fit=max&auto=format&n=XiQC0e0h2Y_rNjKb&q=85&s=9f99793bd8d758d53680087ed65b825a" alt="Issuer URL" width="1628" height="1078" data-path="add-and-manage-users/images/saml-single-sign-on/image10.png" />
    </Frame>
  </Step>

  <Step title="Configuring Single Sign-On in Your Softr App">
    Now that you have everything ready, go to your Softr app's **SAML Settings** and fill in the Metadata.xml field with the XML you downloaded in the previous steps and the key fields with the names of the fields we defined earlier in **Step 3**.

    <Frame caption="SAML settings configured">
      <img src="https://mintcdn.com/softr-2b8a27e1/XiQC0e0h2Y_rNjKb/add-and-manage-users/images/saml-single-sign-on/image11.png?fit=max&auto=format&n=XiQC0e0h2Y_rNjKb&q=85&s=863ff7b3193335efd925ccc189b2bd21" alt="SAML settings configured" width="906" height="990" data-path="add-and-manage-users/images/saml-single-sign-on/image11.png" />
    </Frame>
  </Step>

  <Step title="Adding the Single Sign-On Block">
    That's it, you're all set and can now add the **Single Sign-on** block from **Blocks => User Accounts** to allow your users to log in with their IdP (in this case OneLogin) credentials.

    <Frame caption="Single Sign-On block">
      <img src="https://mintcdn.com/softr-2b8a27e1/XiQC0e0h2Y_rNjKb/add-and-manage-users/images/saml-single-sign-on/image12.png?fit=max&auto=format&n=XiQC0e0h2Y_rNjKb&q=85&s=ae6b0aa6ab0ccfeabad94389c9bd1fdb" alt="Single Sign-On block" width="2824" height="1300" data-path="add-and-manage-users/images/saml-single-sign-on/image12.png" />
    </Frame>

    You can customize the Logo, Title, Page after signin, and other settings and publish your app. Now, all the users that have an account on your OneLogin application, will be able to log in to your Softr app, and a user will be created for them. See below.

    <Frame caption="Logging in with OneLogin account">
      <img src="https://mintcdn.com/softr-2b8a27e1/VxMjh5thxtybPdCf/add-and-manage-users/images/saml-single-sign-on/image13.gif?s=307466180b4e1adbbfad74c78b2ad2fe" alt="Logging in with OneLogin account" width="1437" height="699" data-path="add-and-manage-users/images/saml-single-sign-on/image13.gif" />
    </Frame>
  </Step>
</Steps>
