ASP.NET Core 3.1 Web API to manage the fictitious world-famous Contoso Conference.
Contoso Conference is held every other year and it presents speakers from all around the world to talk about the latest technologies.
- An Azure account with an active subscription
- An Azure AD tenant
- An Azure AD Application to represent the Web API you want to protect
- An Azure AD Application to represent the client (e. g. Postman) you want to allow access to the protected Web API
- Visual Studio 2019
-
Clone this project.
-
Replace
AzureAd
configuration section inappsettings.json
file with the values generated for your Azure AD registered Application that represents the Web API you want to protect."AzureAd": { "Instance": "https://login.microsoftonline.com/", "Domain": "[Enter the domain of your tenant, e.g. contoso.onmicrosoft.com]", "ClientId": "[Enter the Client Id (obtained from the Azure portal), e.g. ba74781c2-53c2-442a-97c2-3d60re42f403]", "TenantId": "[Enter the Tenant Id (obtained from the Azure portal), e.g. da41245a5-11b3-996c-00a8-4d99re19f292]", "Audience": "Enter the Application ID URI (obtained from the Azure portal), e.g. api://ba74781c2-53c2-442a-97c2-3d60re42f403" } ...
-
Build the solution file.
-
Press F5 to start the debug session.
This is my attempt at building a Web API on ASP.NET Core protected with Azure Active Directory using Microsoft Identity Platform. The domain model is based on a Demo Conference API hosted in Azure used by Microsoft in an API Management tutorial.
Copyright © 2022 Felipe Romero