Programmatically deploy the SharePoint Online App and Workflow Actions to multiple site collections

This article describes how to programmatically deploy the Muhimbi SharePoint Online App, as well as the optional SharePoint Designer workflow actions. 

Deploying the separate SharePoint Framework extension - for Modern View integration - is not possible programmatically, at least not at the time of writing. We will update the article once Microsoft makes this possible.

For Muhimbi's Microsoft Flow, Azure Logic Apps and API integration, no deployments steps are required. Microsoft makes our facilities available out-of-the-box.

Please keep in mind that the provided PowerShell scripts are a starting point. Adjust it for your exact requirements.

 

Programmatically deploying the App

SharePoint Online Apps are typically easy to deploy, a few clicks in the SharePoint Online App Store and you are done.

However, some organisations need to deploy our App to thousands of site collections. We recommend using SharePoint Online's built in mechanism for automating this, the App Catalog. However, for some scenarios the facilities of the App Catalog are too limited.

The logical next step is to automate the deployment using code, typically using PowerShell. The steps for doing this are as follows:

  1. Download the Muhimbi PDF Converter App.

  2. Download the sample PowerShell script for deploying the App.

  3. If not already done, install the SharePoint Online management shell.

  4. Edit the PowerShell script for your requirements, or use it as is, and execute it.

  5. Once the App has been deployed programmatically it needs to be trusted. Follow the 'Centrally elevate the App on all site collections' instructions in this Knowledge Base article. At the time of writing it is not possible to programmatically trust a SharePoint Online App.


 
Programmatically deploying the SharePoint Designer Workflow Actions

The Muhimbi PDF Converter for SharePoint Online comes with an optional set of SharePoint Designer Workflow Actions to automate processes. Manual deployment is easy, but if the workflow actions need to be rolled out to a large number of site collections, then a little bit of automation goes a long way.

Steps are as follows:

  1. For sites that have been created as 'Modern Sites', custom scripts are disabled by default. Please enable it as per this Microsoft Article.

  2. Make sure that that App is deployed to all Site collections that require the workflow actions. The Workflow Actions will not work without the App being present on the same site collection.
     
  3. Download the Workflow Actions.

  4. Download the sample PowerShell script for deploying the App.

  5. If not already done, install the SharePoint Online management shell.

  6. Edit the PowerShell script for your requirements, or use it as is, and execute it.

  7. Once the WSP has been deployed programmatically the Feature is enabled by default at the root site collection. To enable it on sub-sites, add custom code to the script that matches your requirements, or manually execute steps 8-10 in the installation instructions.

 

 

 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.