In this first sample I will provide a simple api/controller that will be called presenting a Bearer token, previously acquired using a single html page with adal.js. We will host this page in a different domain and I will also add CORS support in the web api.
In the Azure Portal Active Directory register the application. The ADAL.js on GIT lists all the steps needed for that.
Create the Azure Websites.
Publish the your solution.
Now that we have the web/apis that are protected against AD, in the next post I will enhance the core project to provide some capabilities around Azure Management APIs for accessing Azure Websites and Azure Scheduler programmatically. I will also build an Office 365 SharePoint online App that will consume our api/id controller developed here. I will post that on a separate post that is related to SharePoint here.