What are we going to do?
This article explains how to integrate a web application that is built using Angular and ASP.NET core web APIs, with Azure Active Directory. This is going to be a long post so I have divided this into three parts:
- Part 1: Set up the Azure Active Directory.
- Part 2: Set up Asp.net core web APIs to use Azure AD Authentication
- Part 3: Set up an Angular application to use Azure AD Authentication.
This is Part 1: Set Up Azure Active Directory.
Prerequisites
To follow along you need to know or have the following:
- Basic Understanding of Azure Active Directory
- Azure Subscription
- Basic knowledge of angular 2+
- Basic knowledge of Asp.Net Core Web APIs
All right, now we are good to go for the first step. Let's get started.
Set up Azure Active Directory
To set up the active directory open a browser and navigate to here. After logging in, follow the below steps
- Navigate to Azure active directory, you can find it in your favorites as shown below. If not available then go to all services and search for active directory.

- Create a new directory by clicking on the Create Directory as shown below

- Create an active directory by filling in the basic details, please make a note of domain name.

- After the successful creation of the directory, let's switch the directory to the newly-created directory as shown below.

At this point in time, we have a new directory and now all we need to do is to register our applications in the directory and give some permissions. Let's do that next.
Register Client Application
To register applications click on App registrations and fill in the details as shown below. As I don't want people from other organizations to access this application, I have chosen the first option. Once basic details are filled in please click on Register.

Now go to the overview of this application and follow the steps as shown below. Here the number explains the sequence in which you should click the links.

and fill in the required details.







Hamid KhanPosted Sep 6, 2023, 4:14 AM
Very Good Explain
DennisPosted Jun 29, 2020, 5:45 PM
How would roles work? I'm trying something similar using .net core web api with Angular 8 using Okta sso and getting roles to work is impossible so far.
deepak karmaPosted May 31, 2020, 12:49 AM
What setting i need to doon webapp for deploy this webAPI for "Authentication /authorization" option of Active directory
Kris PenPosted Feb 20, 2020, 11:53 AM
Part2 link is broken
Ceustermans SamPosted Jan 25, 2020, 2:36 PM
Hi, thanks for the guide, when can we expect part 2 & 3? :-)