> For the complete documentation index, see [llms.txt](https://docs.frends.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.frends.com/guides/setup-and-installation/how-to-set-up-entra-id-sso-for-frends.md).

# How to set up Entra ID SSO for Frends

How to set up your own Entra ID for logging in to Frends.

We strongly recommend using your own SSO authentication provider to manage your Frends users.

{% hint style="info" %}
Note that Frends Tenant, API Portal and Business Automation Portal all use different configuration for SSO. Please follow the corresponding instructions to set up each SSO.
{% endhint %}

## Requirements

In order to set up Entra ID (Azure AD authentication) as the SSO provider for Frends login, you will need access to Azure Portal to manage your Entra ID, in order to set up an app registration there.

You will also need administrator rights to your Frends Tenant in order to create the OpenID Connect Application.&#x20;

Alternatively, you can provide this guide and the mentioned details to your Azure and/or Frends administrators to set up the flow.&#x20;

## Choose the Authentication Flow

Frends supports two OpenID Connect flows for SSO login: the **ID token flow** and the **code flow**. You choose the flow separately for each OpenID application in Frends.&#x20;

{% hint style="info" %}
The code flow is available starting from Frends 6.3.
{% endhint %}

In the ID token flow, Frends asks your identity provider to return an ID token directly in the browser redirect, and no client secret is needed.&#x20;

In the code flow, the identity provider returns a short-lived authorization code to Frends, and Frends exchanges the code for tokens using a client secret. The code flow uses PKCE automatically.&#x20;

Using code flow is recommended over the ID token flow, if your identity provider supports it. Entra ID works with either flow. If you already have SSO set up, it keeps using the ID token flow, so no changes are needed when you update to Frends 6.3 or later.

The setup differs in two places: the app registration needs a client secret for the code flow, and the OpenID application in Frends needs the flow and the secret.&#x20;

{% hint style="info" %}
The rest of this guide applies to both flows, and the sections that apply to only one of them say so.
{% endhint %}

## Set Up an Application in Azure

First, you will need to set up the application in the Azure instance where the users you wish to authenticate are registered.

[You can additionally follow the instructions from Microsoft](https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-integrating-applications), along with this guide.

### Create an Application <a href="#h_0561de7c02" id="h_0561de7c02"></a>

Go to Azure Portal using an account that can register new applications in the directory, and go to **Microsoft Entra ID > Manage > App registrations**, and click **New registration**.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FR7qmBrU98xiXCIh1Mxf7%2Fscreenshot-rocks%20(68).png?alt=media&amp;token=b3abdd4a-ac4f-4524-9078-f40dd281ff3f" alt=""><figcaption><p>Creating a new app registration in Azure.</p></figcaption></figure>

Give the app a unique name, and choose suitable supported account type. By default the top option gives access to company's users in single tenant configuration.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FChQte9BnqeRAd0Hk6HhB%2Fscreenshot-rocks%20(90).png?alt=media&amp;token=ef75f536-b137-48af-a2ff-ef17bb701dfd" alt=""><figcaption><p>Initial settings for app registration.</p></figcaption></figure>

### Application and Tenant ID

Find your newly created application and go to its **Overview** page, if you didn't land on it by default. Copy the values of these fields and save them for use.

* Application (client) ID
* Directory (tenant) ID

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FyyxGHrGSZBnflbX3H6W3%2Fscreenshot-rocks%20(69).png?alt=media&amp;token=e6dfb9cc-3cd7-4b95-9bc1-8293fc7a7bc8" alt=""><figcaption><p>Take note of these values for adding the registration to Frends later.</p></figcaption></figure>

### Enable ID Tokens (ID Token Flow) <a href="#h_bd41a7a518" id="h_bd41a7a518"></a>

{% hint style="info" %}
This section applies to the ID token flow.&#x20;

If you use the code flow, you still add the **Web** platform and set the **Redirect** and **Logout URLs** as described in the following sections, and then continue to **Create a Client Secret (Code Flow)**.
{% endhint %}

To use the authentication with ID token flow, you need to set the response from the application to contain an ID token. When viewing the created App registration, you can access the authentication options by navigating to **Manage > Authentication** and selecting **Add a platform**.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FeauItFAYK3phq4yGUix5%2Fscreenshot-rocks%20-%202025-10-03T115728.918.png?alt=media&amp;token=2fd578b3-86df-4358-9190-ac11b0907e2f" alt=""><figcaption><p>Creating a new authentication config in Entra.</p></figcaption></figure>

When setting up the platform, choose the platform type as **Web**, and click next.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2F7kEmfVKBiJFcLgrMJ0fC%2Fscreenshot-rocks%20-%202025-10-03T121247.553.png?alt=media&amp;token=853d0a3a-658b-4e08-9b35-f303a915d12f" alt=""><figcaption><p>Choose Web as the platform type.</p></figcaption></figure>

Configuring the platform includes setting up the Redirect and Logout URLs as well as selecting ID Tokens to be issued.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FGWlInSWISjbWEoH0SEvq%2Fscreenshot-rocks%20-%202025-10-03T120652.458.png?alt=media&amp;token=3e8be313-9dcb-4ab2-81a0-5a139c051d5c" alt=""><figcaption><p>Setting the URIs and ID Token generation.</p></figcaption></figure>

### Redirect URI

Starting with Frends 5.7, the Redirect URI must include an OIDC suffix: `signin-oidc-[Application ID]`.

Example (Frends 5.6 or earlier):

* Redirect URI: `https://myfrendstenant.frendsapp.com`

Updated Redirect URI for Frends 5.7+:

* Redirect URI: `https://myfrendstenant.frendsapp.com/signin-oidc-3e89b538-f75c-42b5-96f1-402f1ac0a549`

Use the earlier saved **Application ID** here instead of the example value.

{% hint style="warning" %}
**Use your own Application ID**, obtained from Azure Portal for your Application registration, instead of the example value. The example value will not work for you.
{% endhint %}

### Logout URL

Set the Logout URL to `https://<myfrendstenant>.frendsapp.com/Account/SignOut` , replacing the Tenant's name with your specific Frends Tenant.

### Redirect URI for migrating from old Frends version

If you are currently using older Frends version, but plan on migrating to 5.7 or later, you can add the new URI in advance **as an additional URI** to the App Registration to ensure functionality before and after the update.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FvTw6rF9SBTpDmXfLqXlT%2Fscreenshot-rocks%20-%202025-10-03T120836.209.png?alt=media&amp;token=0fff980f-b2c5-4e21-b9d1-b0b72a3a174c" alt=""><figcaption><p>Example values for migration from old Frends version.</p></figcaption></figure>

### Create a Client Secret (Code Flow)

{% hint style="info" %}
This section applies only to the code flow. If you're using ID token flow, you can go ahead to the next section to configure Frends.
{% endhint %}

The code flow needs a client secret, which Frends uses to prove its identity to Entra ID when it exchanges the authorization code. Skip this section if you use the ID token flow.

In the app registration, open **Manage > Certificates & secrets**, go to the **Client secrets** tab and click **+ New client secret**. Enter a descriptive name and an expiration time, and click **Add**.&#x20;

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FU1WQmz1KtdvDxjbgzifV%2Fimage.png?alt=media&amp;token=8ac0f038-6c0c-463a-9ea0-3f759122af6f" alt=""><figcaption><p>Steps to create a client secret in Entra.</p></figcaption></figure>

{% hint style="warning" %}
Entra ID client secrets expire. Replace the secret in the Frends OpenID application before the expiration time so users can keep logging in.
{% endhint %}

Copy the **Value** of the new secret straight away, because Entra ID only shows it right after creation. If you lose it, you have to create a new secret.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FvwgO5jDom03iuKGvppPo%2Fframed_20261116-042728.png?alt=media&amp;token=7fb29e51-e9b0-46f6-b6bb-f7f21e53d832" alt=""><figcaption><p>Copy the client secret value right after creating it.</p></figcaption></figure>

## Configure Frends <a href="#configure-frends" id="configure-frends"></a>

For Frends to be able to use the Entra ID Application the following information is needed from the registered Application in Azure:

* Application ID: e.g. `50549e93-99dd-4690-9948-3c8ec076ddfb`
* Tenant: e.g companyname.onmicrosoft.com (Check Azure domain address for example in <https://portal.azure.com/#settings/directory>)

{% hint style="warning" %}
**Use your own Application ID**, obtained from Azure Portal for your Application registration, instead of the example value. The example value will not work for you.
{% endhint %}

Navigate to **Administration > User Management > OpenId** and click **Create new application**. Fill in the values, replacing the example values with your own values from the Azure Portal and your Frends Tenant, and choose who the administrators are.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FCE2sOMZOlvFjiMhorL8W%2Fframed_20261116-043353.png?alt=media&amp;token=75662b57-473e-4ef6-a468-8977b6f852fd" alt=""><figcaption><p>Example values for an OpenID application registration.</p></figcaption></figure>

Also select the flow in **Flow type**.&#x20;

**ID Token (Implicit)** is the default and matches the setup described earlier in this guide.&#x20;

Select **Code (Authorization Code + PKCE)** to use the code flow, and then paste the secret value you copied from Entra ID into **Client secret**.&#x20;

Frends does not show the client secret again after you save it, and the secret is redacted in the audit log. When you edit the application later, leave **Client secret** empty to keep the current secret, or enter a new value to replace it.

### Pre-5.7 Frends versions

If you are setting up the authentication for Frends versions before 5.7, the OpenID settings might look like the following. Follow the tooltips and the values from the new version for examples on the values to be used.

<figure><img src="https://4223974572-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0p415NUmUmiF4ayjI81L%2Fuploads%2FgArTtagl999zeUyS2BkA%2Fimage.png?alt=media&amp;token=d7f548e5-3bda-4c09-8850-d171ffdd6b16" alt=""><figcaption><p>Example of Frends 5.6 OpenID settings.</p></figcaption></figure>

After these have been set up, the login page for Frends shows the option to use your own SSO for logging in. Permissions for the SSO authentication are granted through the User Management in Frends.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.frends.com/guides/setup-and-installation/how-to-set-up-entra-id-sso-for-frends.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
