HTML app and aad authentication

To make our HTML app from azure mobile sites work we had to do some fiddling – well beyond the material noted in the download instructions. The issue were all to do zones, hosting trusts, and CORS.

Having run the simple app in iisxpress, before adding authentication, we then created a visual studio website. This we then published to

Next, we added the required authentication code, in javascript. It turns out the the keyword to induce the Azure AD behavior – vs facebook – is “aad” (unlike for the javascript used in the windows store project).

Finally, one has to register a CORS “family” for our mobile azure site – noting that the azurewebsite hosting the javascript code doing the windows creation/destruction (i.e. ( is a suitably privileged member of the family – when it comes to windows, popups, popdowns, data delivery and the like

Screenshot (136)

Now we can pop windows etc.


On a kindle it looks like this:





About home_pw

Computer Programmer who often does network administration with focus on security servers. Sometimes plays at slot machine programming.
This entry was posted in Azure AD. Bookmark the permalink.