Add Microsoft Entra ID authentication (Members)
Learn how to use Microsoft Entra ID (Azure Active Directory) credentials to login to Umbraco as a member.
This tutorial takes you through configuring Microsoft Entra ID (Azure Active Directory/Azure AD) for the member login on your Umbraco CMS website.
Note for Umbraco Cloud users
Umbraco Cloud supports External Identity Providers, including Entra ID (formerly Azure AD). If you're working on a Cloud project, see the External Login Providers article in the Umbraco Cloud documentation.
On Umbraco Cloud, Entra ID is configured via settings rather than custom code. So, this tutorial is intended for non-Cloud (on-premises or self-hosted) projects.
Prerequisites
A project with a setup for Members.
Visual Studio, or another Integrated Development Environment (IDE).
Step 1: Configure Entra ID
Before your applications can interact with Entra ID, they must be registered with a tenant that you manage. This can be either an Entra ID (Azure AD) tenant, or an Entra ID B2C (Azure AD B2C) tenant. For more information on creating an Azure AD B2C tenant, see Microsoft's Tutorial: Create an Azure Active Directory B2C tenant.
Step 2: Install the NuGet package
You need to install the Microsoft.AspNetCore.Authentication.MicrosoftAccount NuGet package. There are two approaches to installing the packages:
Use your favorite Integrated Development Environment (IDE) and open up the NuGet Package Manager to search and install the packages.
Use the command line to install the package.
Step 3: Implement the Entra ID Authentication
Create a new class for custom configuration options:
EntraIDB2CMembersExternalLoginProviderOptions.cs.
Create a new static extension class called
MemberAuthenticationExtensions.cs.
Add the Members authentication configuration in the
Program.csfile:
Build the project.
Run the website.

Last updated
Was this helpful?