Move To Cloud – Platform Website ADAL.JS and CORS

With the Authentication Team at Microsoft really keeping up with ADAL (Active Directory Authentication Library) and Vittorio’s excellent white board illustrations on the new ADAL for JavaScript made me redo the authentication mechanism from my previous post now using ADAL.JS instead. Our platform sites will use ADAL for Authentication and we will add OWIN and Katana support in our Web APIs. The assumption is that is shrinking down with just core .net framework components, no WCF and probably no IIS in the future.

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.

The two azure sites:
1 – (hosts the token issuer using adal.js)
2 – (core apis with a demo controller api/id)

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.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s