Site Management Workflow Activities - Sample Solution Now Available

Earlier this year, I published a series of blog posts on custom workflow activities for SharePoint 2013 and Office 365. Among other things, I covered how to build workflow activities to:

  • Create sites.
  • Set site permissions and list permissions.
  • Create groups and set group owners.
  • Break permissions inheritance.
  • Set the associated owners, members and visitors groups on a site.
Since then, several people have asked me to make my source solution available - so here it is:

  • It's proof-of-concept code, not production-ready code. 
  • For use as a learning aid in a test environment only.
  • Please read the corresponding blog posts before you play around with the custom activities - they'll make much more sense once you've read the explanations.
To build and test the solution, you'll need a test environment with a local SharePoint 2013 installation, SharePoint Designer 2013, and Visual Studio 2012 with Office Developer Tools or Visual Studio 2013.

When you build the solution, Visual Studio creates a .wsp package. You can add this to the solutions gallery on any SharePoint site (including Office 365) - workflow activities in SharePoint 2013 are entirely declarative, so you don't have to worry about resource points and other restrictions. The solution deploys a site-scoped feature named Site Management Workflow Activities. Once you've activated this feature, the custom activities will be available when you open the site in SharePoint Designer.

Final note: To run these activities, your workflow service needs to be running with app permissions and it needs full control rights over the entire site collection (as you'd expect - you're asking it to create sites, create groups, set permissions, and so on). For guidance, see my first post in the series and the MSDN article Create a workflow with elevated permissions by using the SharePoint 2013 Workflow platform.


  1. Hi Jason, Great work, thank a lot! I downloaded your VS project, but I am having trouble to get is work. I get Object reference not set to an instance of an object when try to activate the SP Feature. Can you point me a direction where to begin to debug? Thanks!

    1. Hi Tamás. It's most likely a configuration issue in your development environment - make sure Service Bus and Workflow Manager are installed, configured and up-to-date, and make sure the workflow service is registered with the SharePoint installation (see for example You could also try deploying in debug mode from Visual Studio (i.e. hit F5). Visual Studio will open a Test Service Host console window and will attempt to activate the workflow feature for you (see for example If the feature activation fails, the console window may provide a little more insight into the problem. Hope that helps.

  2. Hi Jason, could you rebulid the WSP file, i cannot activate the feature on Office 365. thank you.

  3. This comment has been removed by a blog administrator.


Post a Comment

Popular posts from this blog

The target principal name is incorrect. Cannot generate SSPI context.

Server-side activities have been updated

Versioning SharePoint Framework Packages