• Dana Epp

Using Azure AD Easy Auth with Angular

One of the cool things about Azure AD is how easy they make it to act as an Identity Provider (IdP) for your app services in Azure. One of the unfortunate realities is that Microsoft does a good job to document that for traditional web applications that it supports, but is missing the boat a bit when it comes to single page applications (SPA) that are written with frameworks like Angular. When using their EasyAuth technology, I couldn't find any resources to really help me get over that hump.

Or so I thought. Many thanks to Chris Gillum (Microsoft PM for all things app service auth) for pointing me to his client side SPA sample that uses the Azure Mobile JS library. I was able to use that as a guide to build a sample Angular app that can be deployed as an App Service and leverage Azure AD Easy Auth, and hook into both Azure AD and Microsoft Accounts. It also works with Google, Twitter and Facebook with a few tweaks.

You can grab the sample Angular5 SPA app that uses AzureAD EasyAuth from my GitHub repo here.