> ## Documentation Index
> Fetch the complete documentation index at: https://hoopdev-feat-new-runbook-parameters.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OneLogin (SAML 2.0)

## Requirements

* An [account in OneLogin](https://www.onelogin.com/)
* `API_URL` is the public DNS name of the hoop gateway instance

Contact the administrator of the hoop gateway instance to retrieve the `API_URL` address.

## Identity Provider Configuration

<Steps titleSize="h3">
  <Step title="Create an Application">
    Create a new application

    * Go to **Applications** and click on the **Add App** button
    * Search for `saml`
    * Select **"SAML Custom Connector (Advanced)"**
    * Add a display name and click on Save

    <Frame>
      <img src="https://mintcdn.com/hoopdev-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/configure/identity-providers/onelogin-saml-1.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=7f7934b517e7597cb199fe4c70bf1716" width="948" height="318" data-path="images/configure/identity-providers/onelogin-saml-1.png" />
    </Frame>
  </Step>

  <Step title="Confirm your user is allowed to login">
    * Click on **Users** in the **left sidebar**
    * Confirm your user is allowed to login

    <Note>
      If your is not included by default, make sure to add manually through the **Users** menu.
    </Note>
  </Step>

  <Step title="Configure Audience and Recipient">
    * Navigate to **Configuration** in the **left sidebar**
    * In `Audience (EntityID)` add the value `{API_URL}/saml/acs`
    * In `Recipient` add the value `{API_URL}/api/saml/callback`
    * Click on **Save** to persist the changes

    <Note>
      Leave all other fields with default values.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/hoopdev-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/configure/identity-providers/onelogin-saml-2.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=ccecac57e70032c8e4f659985cf45ed9" width="1778" height="714" data-path="images/configure/identity-providers/onelogin-saml-2.png" />
    </Frame>
  </Step>

  <Step title="Collect IDP Issuer URL Metadata">
    * Go to **SSO** in the **left sidebar** and copy the **issuer URL**

    **Example:** `https://app.onelogin.com/saml/metadata/<uuid>`
  </Step>
</Steps>

## Parameters Configuration

To propagate the Display name of users and synchronize with Hoop, make sure to add the following parameters:

* Field Name: `first_name`, Value: `First Name`
* Field Name: `last_name`, Value: `Last Name`

<Frame>
  <img src="https://mintcdn.com/hoopdev-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/configure/identity-providers/onelogin-saml-3.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=a1385b91d9fb4f195a9ab1ec3aa88a82" width="2096" height="1014" data-path="images/configure/identity-providers/onelogin-saml-3.png" />
</Frame>

After a user sign in, the display name will be updated accordingly.

## Groups Configuration

To propagate group to Hoop via SAML is creating User Roles and propagating as SAML assertions values.

<Steps titleSize="h3">
  <Step title="Create a User Role">
    1. Go to **Users** > **Roles**
    2. Click on **New Role**
    3. Add the name of your group and click on **Save**

    <Frame>
      <img src="https://mintcdn.com/hoopdev-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/configure/identity-providers/onelogin-saml-4.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=a013559bf719f0999abb239d8fa4bd7e" width="1894" height="288" data-path="images/configure/identity-providers/onelogin-saml-4.png" />
    </Frame>
  </Step>

  <Step title="Associate Users to Role">
    * Return to **Users** > **Roles**
    * Select the created role
    * Click in Users in the left side bar
    * Add the email on the input "Check existing or add new users to this role"
    * Click in "Add to Role" and then Save

    <Frame>
      <img src="https://mintcdn.com/hoopdev-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/configure/identity-providers/onelogin-saml-5.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=b63ff7379c6fd883fb651a266c564d19" width="2062" height="1190" data-path="images/configure/identity-providers/onelogin-saml-5.png" />
    </Frame>

    <Note>
      You could create a mapping to add users automatically to this role.
    </Note>
  </Step>

  <Step title="Create an Application Mapping">
    * Go to **Applications** > **Your App** > **Parameters**
    * Add a new field with the name `groups`
    * Select the checkbox "Include SAML assertion" and "Multi-value parameter"
    * Click on Save

    <Frame>
      <img src="https://mintcdn.com/hoopdev-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/configure/identity-providers/onelogin-saml-6.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=6fc577a9dba9d18a9bc83a4b41de68ed" width="1092" height="886" data-path="images/configure/identity-providers/onelogin-saml-6.png" />
    </Frame>

    * In the second dropdown field, select "User Roles"
    * In the next one, select "Semicolon Delimited Input (Multi-value output)"
    * Click on Save

    <Frame>
      <img src="https://mintcdn.com/hoopdev-feat-new-runbook-parameters/jEgq0bFD0hXYK9XM/images/configure/identity-providers/onelogin-saml-7.png?fit=max&auto=format&n=jEgq0bFD0hXYK9XM&q=85&s=177e862d8ce2a85e62d976c90f98ef66" width="1264" height="1372" data-path="images/configure/identity-providers/onelogin-saml-7.png" />
    </Frame>
  </Step>

  <Step title="Test it">
    Perform the logout on your Hoop instance and the new group will be synchronized.
  </Step>
</Steps>

<Note>
  Fields from other integrations, such as Active Directory, can likely be propagated by following the same pattern, however this has not been officially validated yet.
</Note>
