This is a demonstration of Office 365 Patterns and Practices code, which shows how to host provider hosted app in Microsoft Azure and provision site collections asynchronously to Office 365 or to on-premises. Sample shows following techniques.
- How use Azure Service Bus to communicate to on-premises without need to expose end points to Internet
- How to implement asynchronous UI based on Azure Storage Queues
- How to associate Azure WebJob to Azure Storage Queue events, so that process will start automatically
- How to create site collections in Office 365 using tenant APIs
- How to provision site collections in on-premises using CSOM API
Actual code and additional details can be found from following address - https://github.com/OfficeDev/PnP/tree/dev/Samples/Provisioning.Hybrid.Simple