# Microsoft Entra ID

{% hint style="info" %}
This feature is available in the **Premium plan and higher**.
{% endhint %}

{% hint style="danger" %}
**Remember to** [**grant your Azure users access permissions**](#step-4-managing-user-access) **to GoodAccess. Users without them won't be able to log in.**
{% endhint %}

## Step 1 - Adding a new identity provider

[Log in to the GoodAccess **Control Panel**, and go to **Settings** > **SSO & Identity**.](https://app.goodaccess.com/sso-and-identity/)

Click **+ Add provider**, enter the **Provider name**, choose your **Identity Provider**, and click **Continue**.

## Step 2 - Setting up Single Sign-On with SAML

Log in to the [Azure Portal](https://portal.azure.com/), and go to **Enterprise applications** (you can use the searchbar).

Click **+ New application**, and **+ Create your own application**.

Give the application a name, choose **Integrate any other application you don't find in the gallery (Non-gallery)**, and click **Create**.

In your new application go to **Single Sign-On** > **SAML**.

<div><figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FCUN85QXUqCDsWPU3h7ak%2FFeatures_SSO_Azure_01.png?alt=media&#x26;token=d9dc31e0-fb4e-45b3-afa7-0b7ff5d13056" alt="Azure Portal with key steps to creating a new enterprise application."><figcaption><p>Creating a new enterprise application</p></figcaption></figure> <figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FsgZTlg4k9VZac7ami3U3%2FFeatures_SSO_Azure_02.png?alt=media&#x26;token=c99e064d-bb21-4927-84cc-809e8095332f" alt="Azure Portal with key steps to creating a new enterprise application."><figcaption><p>Creating a new enterprise application</p></figcaption></figure></div>

<figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FMBdpMTrA2NMHE43GsDZt%2FFeatures_SSO_Azure_03.png?alt=media&#x26;token=5486f539-4b1a-4290-a5d1-2b1944b737e1" alt="Azure Portal with key steps to selecting SAML as a single sign-on method for the enterprise application."><figcaption><p>Selecting SAML as a single sign-on method</p></figcaption></figure>

### 1. Basic SAML Configuration

Click **Edit** to open Basic SAML Configuration.

Copy the details from GoodAccess - **(2) GoodAccess links**.

* **Identifier** - Entity ID
* **Reply URL** - Assertion Consumer Service URL
* **Sign on URL** - Login URL
* **Relay State** - Relay State

Return to GoodAccess, and click **Continue**.

Return to Azure, and click **Save**.

<div><figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FKL5I8JxK0qati8bYtIoH%2FFeatures_SSO_Azure_04.png?alt=media&#x26;token=ba9a53b2-0f7f-4301-9883-48659538b025" alt="Azure Portal with key steps to opening the &#x22;Basic SAML Configuration&#x22;."><figcaption><p>Opening the Basic SAML Configuration</p></figcaption></figure> <figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FYALH54Z1cERR6UTMsopf%2FFeatures_SSO_Azure_05.png?alt=media&#x26;token=dad7c663-6dfd-4e81-9330-a6c2815a4400" alt="Azure Portal with key steps to setting up the &#x22;Basic SAML Configuration&#x22;."><figcaption><p>Setting up the Basic SAML Configuration</p></figcaption></figure></div>

### 2. Attributes & Claims

Click **Edit** to open Attributes & Claims.

Under the Additional claims section click on the record with the value **user.userprincipalname** and edit it as follows:

* **Name** - "name" (without quotes)
* **Namespace** - Delete pre-filled URL

Click **Save**.

Then, still in the Additional claims section click on the record with the value **user.mail** and edit it as follows:

* **Name** - "email" (without quotes)
* **Namespace** - Delete pre-filled URL
* **Source attribute** - user.userprincipalname

Don't forget to **Save**.

<figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FyvZ3WGk9BWnUA4pslmUZ%2FFeatures_SSO_Azure_06.png?alt=media&#x26;token=778d5c38-13a0-446a-8762-4691d9069e53" alt="Azure Portal with key steps to setting up the &#x22;Attributes &#x26; Claims&#x22;."><figcaption><p>Setting up Attributes &#x26; Claims</p></figcaption></figure>

<div><figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FPgFc3nfbn9zJQFvqsNlV%2FFeatures_SSO_Azure_07.png?alt=media&#x26;token=2e33763d-68f7-4ca7-924e-af3b79637ed1" alt="Azure Portal with key steps to managing the &#x22;user.userprincipalname&#x22; claim."><figcaption><p>Managing the "user.userprincipalname" claim</p></figcaption></figure> <figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FGPnTjkmrqBXxkm2irsCZ%2FFeatures_SSO_Azure_08.png?alt=media&#x26;token=46d2c225-b2f0-4cb4-a4e6-d6804e175f74" alt="Azure Portal with key steps to managing the &#x22;user.mail&#x22; claim."><figcaption><p>Managing the "user.mail" claim</p></figcaption></figure></div>

### 3. SAML Certificates

Download the **Certificate (Base64)**, and open the file in a text editor (e.g. Notepad).

<figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FFu3N31xSNZOkqPpLC7Od%2FFeatures_SSO_Azure_09.png?alt=media&#x26;token=9bcfa009-7b31-4c54-8253-a9bd63440af8" alt="Azure Portal with key steps to downloading the certificate."><figcaption><p>Downloading the certificate</p></figcaption></figure>

### 4. Set up GoodAccess

Copy the details to GoodAccess - **(3) Identity Provider links**, and click **Continue**.

* **Sign in URL** - Login URL
* **Entity ID** - Microsoft Entra ID Identifier
* **X509 signing certificate** - Copy the certificate from the text editor

<figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2Fz1c4PUcoG4dLSh85pgE8%2FFeatures_SSO_Azure_10.png?alt=media&#x26;token=de69bc15-2d2d-400f-add2-1796122d4ae5" alt="Azure Portal with key steps to setting up GoodAccess."><figcaption><p>Setting up GoodAccess</p></figcaption></figure>

{% hint style="info" %}
If you don't want to setup SCIM, skip the next step in GoodAccess, and click **Submit** to finish the configuration.
{% endhint %}

You have now successfully set up your Microsoft Entra ID SSO with GoodAccess.

## Step 3 (optional) - Setting up SCIM

In the application, go to **Provisioning** > **Provisioning**, and set **Provisioning mode** to **Automatic**.

Expand **Admin Credentials,** and copy the **URL** and **Token** from GoodAccess - **(4) User provisioning (SCIM)**.

Return to GoodAccess, and click **Submit**.

Return to Azure, and click **Test Connection**, and **Save** to confirm your settings.

<figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FOLoZe2sqhiVW7sdTWD8f%2FFeatures_SSO_Azure_11.png?alt=media&#x26;token=63fbd864-6c8b-4eb1-b569-f95b1b5eb063" alt="Azure Portal with key steps to setting up SCIM."><figcaption><p>Setting up SCIM</p></figcaption></figure>

### 1. Attribute Mapping

Open **Mappings**, and select **Provision Microsoft Entra ID Users**.

Here, make sure that only the following four attributes are listed:

* userName
* active
* displayName
* externalId

If there are other attributes except these four, **Delete** them to prevent provisioning issues.

Don't forget to **Save**.

<div data-full-width="false"><figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2F8Gz2hQ8dNXeVSKnNg6cv%2FFeatures_SSO_Azure_12.png?alt=media&#x26;token=aef3bf7a-69e7-4dde-bd29-5c800dc7159c" alt="Azure Portal with key steps to setting up the &#x22;Attribute Mapping&#x22;." width="563"><figcaption><p>Setting up the Attribute Mapping</p></figcaption></figure> <figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2F4bZX0tKj4kyxUeU0c4XD%2FFeatures_SSO_Azure_13.png?alt=media&#x26;token=c904978d-87e3-4fb7-85f2-c9af31c55dc7" alt="Azure Portal with key steps to setting up the &#x22;Attribute Mapping&#x22;." width="563"><figcaption><p>Setting up the Attribute Mapping</p></figcaption></figure></div>

### 2. Starting the provisioning

{% hint style="danger" %}
Users created via **Provisioning on demand** may be skipped by Azure during future automatic provisioning.

**We strongly recommend avoiding this function.**

If you have already created users this way, click the **Restart provisioning** button to restore synchronization for all users.
{% endhint %}

Go to **Overview**, and click **Start provisioning**.

<figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FbXsBBhCRaky92NE4A2Kx%2FFeatures_SSO_Azure_13.png?alt=media&#x26;token=fdb3d94f-63ae-412a-9201-472dfce2db8f" alt="Azure Portal with key steps to starting the provisioning."><figcaption><p>Starting the provisioning</p></figcaption></figure>

{% hint style="info" %}
The whole provisioning process will take around **20 minutes** to complete depending on the number of members and groups being added.
{% endhint %}

You have now successfully set up Microsoft Entra ID SCIM with GoodAccess.

## Step 4 - Managing user access

In the application, go to **Users and groups**, and click **+ Add user/group**.

Choose who should have access, and click **Assign**.

<figure><img src="https://418253935-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FiJ406Lpi9EKoWDi7GFL7%2Fuploads%2FeZoTjOSbg2DOVnbG74gO%2FFeatures_SSO_Azure_14.png?alt=media&#x26;token=91b6ccb5-2087-42c2-ae34-ac6ca0586d3c" alt="Azure Portal with key steps to managing user access."><figcaption><p>Managing user access</p></figcaption></figure>
