I've posted a little step by step guide in order to show how to get both an o365 and Azure subscription to work with the same Azure Active Directory (so you can authenticate users seamlessly on both platforms): http://www.matvelloso.com/2014/05/05/setting-azure-o365-subscription/

This is the step 1 of a more extensible guidance around creating apps that leverage Azure and o365 together. Stay tuned!