---
title: Registering an App in Entra ID
slug: how-tos/y7Nf-azure-entra-id-app-registration
createdAt: 2025-08-13T11:53:55.804Z
---

## Introduction

In this guide, we will walk you through setting up an app registration in **Microsoft Entra ID** to be used for authentication in Factry Historian and Grafana.

:::hint{type="info"}
Microsoft Entra ID was previously known as **Azure Active Directory (Azure AD)**. It is a cloud-based identity and access management service used to manage users, groups, and permissions for secure sign-in to applications.
:::

***

## Step 1: Access Azure Portal

1. Go to [https://portal.azure.com](https://portal.azure.com) and click on **Microsoft Entra ID**.

![](https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-mjmBs0b8P9DCQEuue7uac-20250902-124712.png)

## Step 2: Create App Registration

1. Click **Add > App registration**.

![](https://api.archbee.com/api/optimize/5fbu7Arve_PpG6EAsx3L9-VndAhDjV9PE8W9mZan3A3-20250813-140213.png)

## Step 3: Configure App Registration

### Factry Historian

1. **Name** the application, e.g. `Factry Historian`.
2. **Supported account types**: select `Single tenant` to limit login to your organization only (recommended).

   ::Image[]{src="https://api.archbee.com/api/optimize/5fbu7Arve_PpG6EAsx3L9-ONgj2YeTyZvhx8GhHSrkZ-20250813-140250.png" size="100" width="880" height="878" position="center" showCaption="false"}
3. **Redirect URI**:
   - Example: `https://myhistorian.com:18000/api/auth/Microsoft/callback`
   - Formula: `<MY-HISTORIAN-BASE-URL>` + `/api/auth/<MY-AUTH-PROVIDER>/callback`
4. Replace `<MY-HISTORIAN-BASE-URL>` with the Factry Historian base URL set in **Configuration > Server Settings > General > Base URL**:
   - e.g. `https://myhistorian.com:18000`
5. Replace `<MY-AUTH-PROVIDER>` with the name of the authentication provider you will set in Factry Historian in **Configuration > Authentication providers**:
   - Example: if your redirect URI is `/api/auth/Microsoft/callback`, then use `Microsoft`.
6. **Note:**
   - The base URL must start with `https://`
   - Must not contain an IP address or `localhost`
   - May include a port number, e.g. `:8000`

     ::Image[]{src="https://api.archbee.com/api/optimize/5fbu7Arve_PpG6EAsx3L9-e_vf6FnFYinZVEy9gxmuI-20250813-142851.png" size="100" width="1052" height="743" position="center" showCaption="false"}
7. Save the App registration by clicking **Register**.

### Grafana

1. **Name** the application, e.g. `Grafana`.
2. **Supported account types**: select `Single tenant`.

   ::Image[]{src="https://api.archbee.com/api/optimize/5fbu7Arve_PpG6EAsx3L9-qvtkpr9QW1cOk7K6dpMvt-20250813-142649.png" size="100" width="880" height="878" position="center" showCaption="false"}
3. **First redirect URI**:

![](https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/5dULc7chGmS22nGTk_otp_image.png)

:::Paragraph{listStyleType="disc" indent="2"}
Example: `https://mygrafana.com:443/login/azuread`
:::

:::Paragraph{listStyleType="disc" indent="2"}
Formula: `<MY-GRAFANA-ROOT-URL>` + `/login/azuread`
:::

4. Replace `<MY-GRAFANA-ROOT-URL>` with the Grafana root URL set in **Home > Administration > General > Settings**:
   - e.g. `https://mygrafana.com:443`
5. **Note:**
   - Must start with `https://`
   - Must not contain an IP address or `localhost`
   - May include a port number, e.g. `:3000`
6. **Second redirect URI**:

![](https://api.archbee.com/api/optimize/SMPo4IS9FkillUAMsur2c/uxlUi32oqDvZuAH3-q2q5_image.png)

:::Paragraph{listStyleType="disc" indent="2"}
Example: `https://mygrafana.com:443`
:::

:::Paragraph{listStyleType="disc" indent="2"}
Formula: `<MY-GRAFANA-ROOT-URL>`
:::

:::Paragraph{listStyleType="disc" indent="2"}
e.g. `https://mygrafana.com:443`
:::

::Image[]{src="https://api.archbee.com/api/optimize/5fbu7Arve_PpG6EAsx3L9-2zARyC_fCGw-vmuczV0qA-20250813-142511.png" size="100" width="803" height="840" position="center" showCaption="false" indent="3"}

7. Save the App registration.

## Step 4: Application/Directory ID and Client Secret

1. In Entra ID, go to **Manage > App registrations**.

   ::Image[]{src="https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-zZd0HkLESM8Y-YZnuvVTs-20250902-130534.png" size="42" width="934" height="1236" position="center" showCaption="false"}
2. Select an Application you have created in the previous steps. There should be one for Factry Historian, and one for Grafana.
3. From the specific App registration's overview in Entra ID, copy the following values:

   ::Image[]{src="https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-K6rqGudYGqmicnyW0JtIW-20250902-132638.png" size="100" width="2676" height="1378" position="center" showCaption="false"}

   - `Application (client) ID`
   - `Directory (tenant) ID`

:::hint{type="info"}
You will need the **Application (client) ID** in the *Next steps* section when configuring Entra ID authentication for Factry Historian and Grafana.
:::

4. Back on the specific App registration's overview in Entra ID, click **Add a certificate or secret**.

   ::Image[]{src="https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-nfvGXQ5jWlngTiyUCWmet-20250902-132616.png" size="100" width="2676" height="1378" position="center" showCaption="false"}
5. Next, click **New client secret**.

   ::Image[]{src="https://api.archbee.com/api/optimize/5fbu7Arve_PpG6EAsx3L9-hXCgaU7OofnJ5SU0j226p-20250813-142211.png" size="100" width="1914" height="558" position="center" showCaption="false"}

:::hint{type="info"}
You will need the **client secret**  in the *Next steps* section when configuring Entra ID authentication for Factry Historian and Grafana.
:::

6. Enter a name and expiration date for the client secret and click **Add**.

   ::Image[]{src="https://api.archbee.com/api/optimize/QT0Op5BmASO-D5eI7lmoL-lU5qQBmiYABdivnZehaHj-20250902-133049.png" size="100" width="1150" height="468" position="center" showCaption="false"}
7. Copy the Value.

![](https://api.archbee.com/api/optimize/5fbu7Arve_PpG6EAsx3L9-nhAQibnan-qmVuUC_3cAg-20250813-143024.png)

:::hint{type="warning"}
Track the client secret's expiration date: once expired, authentication will stop working. Renew the secret in advance and update the value in Factry Historian/Grafana.
:::

## Next steps

You now have all the required values, **Tenant ID**, **Client ID**, and **Client Secret** from your Microsoft Entra ID app registration.
You can now continue by configuring authentication in your applications:

- For **Factry Historian**, see [Setting up Entra ID authentication in Factry Historian](docId:8fvF2zGAngAF70QY5yYeC).
- For **Grafana**, see [Setting up Entra ID authentication in Grafana](docId\:HrYBCUQsEZVwUMwdjOeW1).

## Troubleshooting

- [Troubleshooting Entra ID Authentication](docId\:qOg3bRlwI2HFPDLojGFXm)
