This is the demo code, slightly tweaked since the demo mainly UI, for the session on O365 APIs in SPDC Reston Oct 25 2014