How to Create a SharePoint Site Collection App Catalog using PnP PowerShell

Sometimes you need to test SharePoint solutions in your tenant before making them available to everyone or simply to restrict the use to a subset of users by making them available in specific sites. If you are a SharePoint administrator and already have the global SharePoint app catalog created, you will be able to create site collection app catalogs for your site collections individually. Unfortunately, this feature is not available through the SharePoint admin UI and will require you to use one of the available PowerShell modules to manage SharePoint. In this article, we will see how to do it using PnP PowerShell.

SharePoint site collection app catalog

Prerequisites

To create a site collection app catalog, you need to have the following:

  • A SharePoint Online tenant with the global app catalog already created, if you are doing this in a brand new tenant you will be able to create the global app catalog from the SharePoint admin UI
  • A site collection where you want to create the app catalog. You can use any site template, such as team site, communication site, or hub site.
  • PnP PowerShell installed on your machine. You can download it from here or install it using the following command:

Install-Module -Name PnP.PowerShell

 

Create a SharePoint Site Collection App Catalog

To create a site collection app catalog using PnP PowerShell, follow these steps:

  1. Connect to your SharePoint Online tenant using the following command:
    Connect-PnPOnline -Url https://<tenant>-admin.sharepoint.com -Interactive

    Replace <tenant> with your actual tenant name and enter your admin credentials when prompted.

  2. Enable the site collection app catalog feature on your site collection using the following command:
    Add-PnPSiteCollectionAppCatalog -Site https://<tenant>.sharepoint.com/sites/<sitecollection>

    Replace <tenant> with your actual tenant name and <sitecollection> with your actual site collection name.
    SharePoint site collection app catalog

  3. Verify that the app catalog has been created successfully by navigating to your site collection and clicking on Site contents. You should see a new library called Apps for SharePoint.
    SharePoint site collection app catalog
  4. To install a new app into the site collection simply upload the SPPKG file of your app into the app catalog and it will be restricted just to the site collection members

Conclusion

You’ve learned how to use PnP PowerShell to create a site collection app catalog in SharePoint Online. This feature lets you test and deploy SharePoint solutions to specific sites without affecting the rest of your tenant. You can also manage the app lifecycle, such as updating, uninstalling, or removing apps, from the site collection app catalog.


No comments yet

Leave a Reply


I've been working with Microsoft Technologies over the last ten years, mainly focused on creating collaboration and productivity solutions that drive the adoption of Microsoft Modern Workplace.

%d bloggers like this: