azure mobile site, tokens and AAD

Unlike the video showing how to make a windows store application talk to azure active directory (which entails using a store redirect URI and a clientid), the xamarin apps for ios and android induce AAD to send the token to the azure mobile website. The site then returns a custom token to the app:

Screen Shot 2014-06-02 at 8.08.48 PM

the code is on ondrive. Its is a merge of the hellotest app (from the native Android ADAL project for Xamarin bindings, on github) and the sample azure mobile site app for Xamarin/Android. Quite a few changes were made.

The activity element (for continuance tasking) and the permissions:

Screen Shot 2014-06-03 at 12.05.00 AM

the promise closure (that complets the login, with the webAPI client UA)

Screen Shot 2014-06-03 at 12.07.19 AM

initialization, button callback, and continuance handler:

Screen Shot 2014-06-03 at 12.09.17 AM

Our goal was NOT to have the token auto-posted to the mobile site (which then mints a session token); but capture the AAD tokens directly in the client (which then uses LoginAsync() to create a web service session).

The major gotcha, on binding to the Xamarin binding DLL (wrapping the java objects) is that one must reference the DLL in the obj/ directory of the bindings creation project using the browser file picker. Do not try to bind to the solution DLL (referring to the .dll  in debug/ or release/).


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 AAD. Bookmark the permalink.