Azure AD and the Microsoft identity platform have well established patterns and support for this workflow. In this blog post I will break down an end-to-end example that includes enabling this flow for AAD users with the following technologies: an Azure AD App configured with role-based access control (RBAC) claims, client side code leveraging React and ADAL.js, and server side code leveraging ASP.NET Core.
Why Azure WebJobs?
Azure WebJobs are a great resource included in Azure App Service plans. They provide a way for you to run binaries or scripts that perform scheduled or event-triggered job processing for work that isn’t suited to be done during a normal web request. Have a monthly cleanup task for your website? Sending a big batch of emails? Need to process some user uploaded files? These are all great examples of things you can throw into a WebJob.
.NET developers should be familiar with the classic web.config file used for storing web site options, application settings, and connection strings. When you deploy a .NET Web Application to Azure this file can still be used, however a new additional settings layer in Azure is provided.
About Deployment Slots
Azure web app service has a fantastic feature called “Deployment Slots”, available on standard or premium mode pricing tiers. This feature allows you to spin up multiple slots (full instances) of your web application for test/development and staging uses.