Feature Stapling is a popular development practice for adding functionality to a specific type of site in SharePoint. Although it has become the preferred approach over custom site definitions, it still requires the deployment of a farm solution. Unfortunately, SharePoint Online doesn’t support features stapling or custom site definitions. So how can an organization deploy capabilities to a group of existing sites or new sites that match specific criteria? The answer is app deployment through an app catalog…something I like to call “app stapling”. Here is a video that illustrates the concepts outlined in this blog post:
The App Catalog is a special site collection aimed at storing, managing, and delivering Office/SharePoint apps to the enterprise. Administrators of an App Catalog can upload apps and make them available to site owners (they can also flip a kill switch to disable the apps). However, administrators can also use the catalog to push apps to specific site collections, managed paths, and site templates. To get started, you should provision an app catalog in your tenancy (on premise users will need to do additional steps outlined in Configure an environment for apps for SharePoint). This can be done from SharePoint Admin Center in Office 365 by clicking on the Apps link in the side navigation and then selecting App Catalog:
Once the App Catalog has been provisioned, it should look similar to this:
In order to "push" and app out to specific sites, we first need to upload it to the App Catalog. Navigate to the App Catalog and select the Apps for SharePoint link in the side navigation. You can simply drag/drop an .app file into this library to make it available to the organization:
Next, we need to install the app into the App Catalog (not to be confused with uploading to the App Catalog). This seems a little odd, but it is the only way to push it specific sites in the tenancy. You can install the app into the App Catalog just like you would from any other SharePoint site. Select Site Content > add an app > From Your Organization > and select the app to install:
Now that the app is installed into the App Catalog, we can manage the deployment to other sites. Select Site Content from the App Catalog and find the installed app. Selecting the ellipse should display a "Deployment" option does doesn't display in other sites:
This Manage App Deployment screen allows an administrator deploy/retract an app to/from specific site collections, managed paths, and site templates. Performing this "app staple" will work on all existing sites and any new sites that meet the criteria.
A few interesting notes about how this functions:
App deployment through the App Catalog provides a great deal of flexibility and governance for SharePoint deployments on-premise and in Office 365. I can see “App Stapling” being used for a number of scenarios where feature-stapling has been used in the past.