Protect a ASP.NET Core web API with the Microsoft identity platform - Azure AD - Microsoft Entra
{tocify} $title={Table of Contents} In this quickstart, you download an ASP.NET Core web API code sample and review the way it restricts resource access to authorized accounts only. The sample supports authorization of personal Microsoft accounts and accounts in any Azure Active Directory (Azure AD) organization. Prerequisites Azure account with an active subscription. Create an account for free. Azure Active Directory tenant .NET Core SDK 3.1+ Visual Studio 2019 or Visual Studio Code Step 1: Register the application First, register the web API in your Azure AD tenant and add a scope by following these steps: Sign in to the Azure portal. If you have access to multiple tenants, use the Directories + subscriptions filter in the top menu to switch to the tenant in which you want to register the application. Search for and select Azure Active Directory. Under Manage, select App registrations > New registration. For Name, enter a name for your application. For example, enter AspNetCore