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

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

For Muhimbi's Microsoft Power Automate (Flow), Azure Logic Apps and API integration, no deployment 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.

Programmatically deploying the SPFx Extension

Use the steps described below to deploy the optional SPFx extension programmatically. This will make the extension available to all existing as well as new site collections in the tenant. Manual installation steps can be found here.

  1. Download the SPFx extension.

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

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

  4. Make sure you have app catalog in your tenant. If not, follow these instructions to create one.

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

  6. The script will upload the SPFx extension to the catalog and deploy it tenant wide.

Make sure you familiarise yourself with the manual installation steps, and related information outlined in this Knowledge Base article.

Have a Question?
We’re Always Happy to Help.

© Muhimbi Ltd. 2008 - 2024
This website uses cookies to ensure you get the best experience. Learn more