Using Azure Logic Apps for Site Provisioning in Office 365 part 2

By | 2015-07-17

This is Part 2 of of my attempt to create a Site Provisioning solution with an Azure LogicApp. Here you can find Azure Logic Apps for Site Provisioning in Office 365 part 1. And my initial thoughts on Azure Logic Apps and Office 365.

In this Part I want to use the Azure ServiceBus Queue I created in Part 1 in my Workflow/Azure LogicApp. For a provisioning solution I want to have users submit New Site Requests in a SharePoint List. The Azure Logic App has a SharePoint Online Connector which can poll this List. If an Item in this List is found, the Workflow will start and we will have the ListItem available as Data. From here I will send the SiteRequest to the Azure ServiceBus and I will send an Email to notify that the Site Collection is queued to be created. The overall process is shown here:


First configure a SharePoint List with at least these columns:

  • Title, the Site Collection Title
  • TemplateCode, the SharePoint Site Template to use
  • Notification Email Address, to send the email to

If you are proficient with SharePoint Lists and SharePoint Designer Workflows, you can even work with Lookup Lists. To be able to use the values for Lookup Lists, use a SharePoint Designer Workflow to copy these values over to simple Text Fields on your ListItem.

office365-sharepoint-online-list-siterequest-1 office365-sharepoint-online-list-siterequest-2

For the SharePoint Online Connector we will also need a seperate List in SharePoint to store processed ListItems in. For every column in this Archive List that matches the original List, values will be copied over. Now we move over to the Azure Preview Portal and we Create a new Empty Logic App, choose a Plan that suits you. I worked with the Free Plan for this.

We add three Logic App Connectors: SharePoint Online, Azure Service Bus and Office 365:


We can now connect the SharePoint Online Connector to our SharePoint Tenant that holds our List. If everything worked out ok you should now see the Columns you added in your List as part of the Connector Body:


We are now really close to complete the entire flow. Connect the Azure Service Bus Connector to our Queue (see Part 1 for Connection Strings) and configure the Content to send a JSON object to the Queue. Set the Content Type to “text/plain”.

The Office 365 Connector allows us to send an Email. I added the NotificatioEmail field to the ListItem and will use that as recipient. After everything is configured:


And we have completed the implementation, now we test!

There are lots of little details that do matter for this work, which are not part of these posts. Maybe I will focus on more detail another time, for now I leave you with my lessons learned:

  • With only 2 methods written in C#, a complete workflow, spanning multiple systems, with logging and tracing, can be created using Azure Logic Apps
  • Azure Logic Apps are in Preview, which was a given when I started this, but there are some annoying bugs in the editor
  • There is room for improvement and there is great value already

3 thoughts on “Using Azure Logic Apps for Site Provisioning in Office 365 part 2

  1. Pingback: Using Azure Logic Apps for Site Provisioning in Office 365 part 2 | Stef van Hooijdonk | Direct Cloud

  2. Pingback: Logic Apps Community Showcase - Azure Logic Apps - Site Home - MSDN Blogs

Leave a Reply

Your email address will not be published. Required fields are marked *