---
title: Enable SSO in HiveMQ Control Center With Microsoft Entra ID
description: A step-by-step guide to enable Single Sign On (SSO) in HiveMQ control center with Microsoft Entra ID.
date: 2026-02-20
published: 2024-04-10
author: Harminder Jandu
tags:
  - HiveMQ Extension
  - Security
source: https://www.hivemq.com/blog/securing-mqtt-devices-oidc-authentication-hivemq-entra-safegaurding-iot
---

# Enable SSO in HiveMQ Control Center With Microsoft Entra ID

[HiveMQ Enterprise Security Extension (ESE)](/products/extensions/enterprise-security-extension) offers seamless integration with existing enterprise authentication systems, simplifying the management of user credentials and access permissions. In [Part 1 of the ](/blog/authenticating-mqtt-devices-hivemq-microsoft-entra-safegaurding-iot)***[Safeguarding Your IoT Ecosystem](/blog/authenticating-mqtt-devices-hivemq-microsoft-entra-safegaurding-iot)***  [blog](/blog/authenticating-mqtt-devices-hivemq-microsoft-entra-safegaurding-iot) [series](/blog/authenticating-mqtt-devices-hivemq-microsoft-entra-safegaurding-iot), we learnt how HiveMQ ESE offers seamless integration with enterprise systems such as Microsoft Entra for OAuth 2.0/JWT authentication. In the second part of this series, we provide steps to set up Single Sign On (SSO) for users to access the [HiveMQ Control Center](/products/control-center)[ ](/products/control-center)portal with Microsoft Entra ID.

The setup entails leveraging the [OIDC authentication using HiveMQ Enterprise Security Extension (ESE) and Microsoft Entra](https://docs.hivemq.com/hivemq-enterprise-security-extension/latest/ese.html#oidc-cc) as the IDP. For further information on OIDC flow being used from Microsoft Entra, you can reference details [here](https://learn.microsoft.com/en-us/entra/identity-platform/v2-protocols-oidc).

## Prerequisites for Setting up HiveMQ ESE and Microsoft Entra ID 

Before getting started, there are a few items that you will need in order to set up a test.  The following are required:

- A Microsoft Entra ID account or access to Entra ID in your Azure instance
- A running HiveMQ Broker to set up, which you can [download for free](/download/). Note that the HiveMQ trial comes with ESE for free (remember that it runs for 5 hrs, but you can restart HiveMQ to re-run it).

The steps outlined further in this blog post will guide you through setting up your Microsoft Entra ID environment with an Application Registration. The information within the Application Registration will be required as input for the HiveMQ ESE configuration. For the setup of HiveMQ ESE configuration, the details on what specific entries are required on the corresponding config.xml will be explained.

## Setting Up Microsoft Entra ID

1. Go to [Microsoft Entra](https://entra.microsoft.com/) and create an account or go to Entra within your Azure instance.
2. Navigate to Applications and select **App registrations**

**Step 1:**

Select **New registration**.

![Setting Up Microsoft Entra ID - New Registration](https://a.storyblok.com/f/243938/1262x626/3a0fd2803f/securing-mqtt-devices-oidc-authentication-hivemq-entra-safegaurding-iot-image-1.webp)

Enter your **Redirect URI** that needs to match with the redirect URI on your ESE configuration.

![Redirect URI in HiveMQ ESE configuration](https://a.storyblok.com/f/243938/1676x955/04b5b7ea52/securing-mqtt-devices-oidc-authentication-hivemq-entra-safegaurding-iot-image-2.webp)

**Step 2:**

Go to **Endpoints** and note the following:

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

You will need these for ESE config setup.

![Microsoft Entra set up](https://a.storyblok.com/f/243938/1196x678/1c7144596d/securing-mqtt-devices-oidc-authentication-hivemq-entra-safegaurding-iot-image-3.webp)

**Step 3:**

Create a new **Client secret** under **Certificate & Secrets**.

![Adding certificates and secrets on Microsoft Entra](https://a.storyblok.com/f/243938/1058x582/e2da86e187/securing-mqtt-devices-oidc-authentication-hivemq-entra-safegaurding-iot-image-4.webp)

Note: Upon creation of the client secret, save the value as it will then be partially masked after you leave this window.

**Step 4:**

Create a new **App role** for a `superuser` and for a `viewer`.

![Microsoft Entra](https://a.storyblok.com/f/243938/1254x690/931bc9c889/securing-mqtt-devices-oidc-authentication-hivemq-entra-safegaurding-iot-image-6.webp)

**Step 5:**

Navigate to **Enterprise applications**, then to **Users and groups.** Click the **Edit assignment** tab.

![Create a new App role for a superuser and for a viewer on Microsoft Entra](https://a.storyblok.com/f/243938/1196x630/8ecb402a37/securing-mqtt-devices-oidc-authentication-hivemq-entra-safegaurding-iot-image-5.webp)

**Step 6:**

Go to **Select a role**.

![Setting up Microsoft Entra](https://a.storyblok.com/f/243938/1266x620/51e75e5e75/securing-mqtt-devices-oidc-authentication-hivemq-entra-safegaurding-iot-image-7.webp)

## Setting Up the HiveMQ ESE Configuration

Now with the Entra ID setup in place, the next step is to generate the corresponding config.xml for ESE to be applied on the HiveMQ Broker node(s).

As we are using OIDC authentication from the HiveMQ Control Center the ESE configuration setup will be with an oidc-realm that will specify the Entra ID tenant ID setup in the previous steps. Below is a snippet of the ESE config.xml, and enter your appropriate settings for:

- `jwks-endpoint `
- `Client ID `
- `Secret Password `
-

Note: You can also set environment variables for the Client ID and Secret Password on HiveMQ node and enter those into the configuration, thereby ensuring no exposure of any Client ID or Secret Password. For details, see [the documentation here](https://docs.hivemq.com/hivemq/latest/user-guide/configuration.html#environment).

Below is a further snippet of the ESE configuration that has the oidc-authentication manager sourcing the `oidc-realm` setup above and file-based authorization.

Please note that we are configuring the scopes for **profile** and **openid** in addition to **User.Read**.

## HiveMQ ESE File Realm Setup 

Create a file **ese-file-realm.xml** and save it in your `/hivemq/extensions/hivemq-enterprise-security-extension/conf `directory.

To view client list information, the user must also have the following permission:

`HIVEMQ_VIEW_DATA_CLIENT_ID`

Below is a sample of the file realm:

## Test Setup 

With the ESE config.xml in place, start HiveMQ. If needed, remove the DISABLED file from the ESE path (extensions/hivemq-enterprise-security-extension/).

Navigate to your Control Center URL. If running locally, it will be <http://localhost:8080>.

Enter in `username` and `password`of the ***superuser***.

Verify you have successfully logged into the Control Center.

## Conclusion

In summary, through the integration of HiveMQ ESE with Microsoft Entra, organizations can effortlessly implement Single Sign On (SSO) for the HiveMQ Control Center, enhancing security with robust OIDC authentication and simplifying access management for IoT deployments.
