Azure Active Directory (Azure AD) is Microsoft’s multi-tenant, cloud-based directory and identity management service. Azure AD combines core directory services, advanced identity governance, and application access management. Azure AD also offers a rich, standards-based platform that enables developers to deliver access control to their applications, based on centralized policy and rules.
If you are an Office 365, Azure or Dynamics CRM Online customer, you might not realize that you are already using Azure AD. Every Office 365, Azure and Dynamics CRM tenant is actually already an Azure AD tenant. Whenever you want you can start using that tenant to manage access to thousands of other cloud applications Azure AD integrates with!
Prerequisite
- VS2015 or VS2017 should have installed in your machine
- Microsoft Azure account – if you don’t have azure account, sign on for free
Let’s quickly create a website having Azure Active Directory authentication using Visual Studio.
Step 1
Visual Studio >> New Project >> Web >> Select Web Application – give it some name and then press Ok.
Step 2
Now, Choose template and then click on Change Authentication
Step 3
Select Work or School Accounts then select Cloud – Single Organization in the drop-down.
Now for the domain, we have to log into Azure account and then available domains will appear in the drop-down – Select the domain and then press OK.
Step 4
We can see our domain information below. Now, Select OK.
Step 5
We can see our demo application in Solution Explorer, there’s a file named “appsettings.json” - has all the authentication related information in it.
appsettings.json
Step 6
Run Application – it will land into Microsoft sign in page.
Wow, we have logged into our application through AD authentication!!
In just 6 steps, we have created Azure Active Directory enabled website – Visual Studio made it so simple to use Azure services.
References
- https://docs.microsoft.com/en-us/azure/active-directory/active-directory-whatis
- https://channel9.msdn.com/Series/Windows-Azure-Active-Directory/Windows-Azure-Active-Directory-Cartoon