SharePoint Online: How to Create Site Collection App Catalog?

Requirement: Enable site collection app catalog in SharePoint Online.

How to create a Site Collection App Catalog in SharePoint Online?

App catalog in SharePoint Online is a central repository where Apps are installed and accessible to all sites in your Office 365 tenant. Site collection app catalog allows you to configure a Site collection specific App Catalog. Once enabled, site collection administrators can deploy SharePoint Apps/add-ins and SPFx solutions that will be available only in that particular site collection. This means that instances of the App are only available for use on the Site Collections where the Apps are added to their respective Site Collection App Catalogs.  Site collection App catalogs are generally used for the decentralization and scope limiting of SharePoint Apps.

When to use Site Collection App Catalog?

Tenant administrators can enable app catalog on the specific sites in following scenarios.

  1. When you want certain solutions to be available in only specific sites – You can deploy your apps in site collection app catalog to prevent it from available across all sites in the tenant.
  2. You are developing an App and you want to make the app available only within a dev site until its ready. Or if you want to test an app without making it visible for the whole tenant.
  3. You want to have multiple versions of your Add-in / App installed on your tenant.
  4. You want to offload some responsibility or control permissions to access to tenant app catalog – You can delegate the management of your SharePoint Add-in / App to can upload SPFx solutions in their own site collection without bothering the tenant administrator.
sharepoint online site collection app catalog

As you can see, Add-in / App or SPFx solutions can be directly uploaded to Tenant App Catalog and will be available across the entire tenant site collection or they can be uploaded to specific site collection app catalogs and they will be made available to specific site collection only.

SharePoint Online: Create Site Collection App Catalog using PowerShell

To create a SharePoint Online site collection app catalog, we can use this PnP PowerShell script. Run this script as a tenant administrator. Make sure you have “Tenant Admin” rights and site collection Administrator rights on the “Tenant App Catalog” site before proceeding. Otherwise, you’ll face

Add-PnPSiteCollectionAppCatalog : Must have Manage Web Site permissions or be a tenant admin in order to add or remove sites from the site collection app catalog allow list” Error!

Enable App Catalog in SharePoint Online Site Collection using PowerShell

Here is the PnP PowerShell to add site collection app catalog in SharePoint Online.

#Parameters
$TenantAdminURL = "https://crescent-admin.sharepoint.com"
$SiteURL = "https://crescent.sharepoint.com/sites/Dev"

#Connect to Tenant Admin
Connect-PnPOnline -Url $TenantAdminURL -Credentials (Get-Credential) 

#Enable site collection app catalog
Add-PnPSiteCollectionAppCatalog -Site $SiteURL

Once you execute this script, you should see the “Apps for SharePoint” in the Site Collection’s Site Contents page.

sharepoint online create site collection app catalog
To get all site collection app catalogs in your tenant visit this URL: https://<tenant>.sharepoint.com/sites/<tenant-app-catalog>/Lists/SiteCollectionAppCatalogs/AllItems.aspx

We can get all sites where Site collection app catalog is enabled, with PnP PowerShell:

$TenantURL =  "https://crescentintranet.sharepoint.com/"

#Connect to the Tenant
Connect-PnPOnline -Url $TenantURL -UseWebLogin

#Get the Tenant App Catalog
$AppCatalog = Get-PnPTenantAppCatalogUrl
Connect-PnPOnline -Url $AppCatalog -UseWebLogin

#Get All Sites where Site Collection App Catalog is enabled 
$ListItems = Get-PnPListItem -List "Site Collection App Catalogs"
ForEach($Item in $ListItems){
    Write-host $Item.FieldValues.Item("SiteCollectionUrl")
}

Disable Site Collection App Catalog using PowerShell

Use this PnP PowerShell to remove the site app catalog functionality from your site.

#Parameters
$TenantAdminURL = "https://crescent-admin.sharepoint.com"
$SiteURL = "https://crescent.sharepoint.com/sites/Dev"

#Connect to Tenant Admin
Connect-PnPOnline -Url $TenantAdminURL -Credentials (Get-Credential) 

#disable site collection app catalog
Remove-PnPSiteCollectionAppCatalog -Site $SiteURL

Reference: https://docs.microsoft.com/en-us/sharepoint/dev/general-development/site-collection-app-catalog

How to Deploy an App to Site Collection App Catalog?

To deploy an App to SharePoint Online site collection app catalog, follow these steps:

  • Navigate to the Site Contents page of the Site Collection you have enabled app catalog.
  • Click on the “Apps for SharePoint” list.
  • When on the Apps for SharePoint library, upload your custom solution .sppkg or .app file using either the Upload button or dragging and dropping the file from your computer to the library.
  • If its a .sppkg, You’ll get a prompt asking if you trust the solution and if you would like to “Make this solution available to all sites in the organization”. Make sure to check this option and then click Deploy.

We are actually enabling the app to be accessible to all Sub Sites of the Site Collection, not the organization as a whole.

Creating a Tenant App catalog and site collection app catalog (using SharePoint Online Management Shell) is explained in my other post: How to Create App Catalog Site in SharePoint Online?

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

4 thoughts on “SharePoint Online: How to Create Site Collection App Catalog?

  • July 20, 2021 at 6:46 AM

    Can you make a site collection catalog available to multiple site collections (e.g. the ones that are connected to your Hub site)? Or would you have to create a site collection catalog for each site collection and upload each SPFX solution to each?

    Reply
    • September 9, 2021 at 1:17 PM

      No, Unfortunately! Apps deployed in Site collection App Catalog are limited within that site collection. Even Hub sites do not support app-push down. So, install the package globally in the central app catalog.

      Reply
  • July 7, 2020 at 9:17 AM

    There is a typo in “Disable Site Collection App Catalog using PowerShell”. Please update command to Remove-PnPSiteCollectionAppCatalog instead of Add-PnPSiteCollectionAppCatalog

    Reply

Leave a Reply