|
| 1 | +--- |
| 2 | +title: Use the site collection app catalog |
| 3 | +ms.date: 12/14/2017 |
| 4 | +ms.prod: sharepoint |
| 5 | +ms.assetid: fdf7ecb1-9951-475b-b058-3285fba77b68 |
| 6 | +--- |
| 7 | + |
| 8 | +# Use the site collection app catalog |
| 9 | + |
| 10 | +_**Applies to:** Office 365_ |
| 11 | + |
| 12 | +Using site collection app catalogs, SharePoint tenant administrators can decentralize the management and scope the deployment of SharePoint add-ins and SharePoint Framework solutions to specific sites. |
| 13 | + |
| 14 | +## Why site collection app catalogs |
| 15 | + |
| 16 | +Previously, all add-ins and SharePoint Framework solutions had to be managed centrally in the tenant app catalog. While tenant administrators could delegate the access to other people in the organization, a deployed package was visible on all site collections. SharePoint offered no supported way of deploying add-ins and SharePoint Framework solutions only to specific sites. |
| 17 | + |
| 18 | +With the introduction of site collection app catalogs, tenant administrators can enable app catalog on the specific sites. Once enabled, site collection administrators can deploy SharePoint add-ins and SharePoint Framework solutions that will be available only in that particular site collection. |
| 19 | + |
| 20 | +The following schema illustrates using site collection app catalogs: |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +In your Office 365 tenant you have a tenant app catalog. Solutions deployed to this app catalog, can be installed in any site collection in the tenant. Tenant administrators can choose to enable site collection app catalogs on specific site collections. Solutions deployed to the site collection app catalogs can only be installed in that particular site collection. |
| 25 | + |
| 26 | +## Supported capabilities |
| 27 | + |
| 28 | +### Support for both SharePoint add-ins and SharePoint Framework packages |
| 29 | + |
| 30 | +In site collection app catalogs, just as in tenant app catalog, you can deploy both SharePoint add-ins and SharePoint Framework solutions (.sppkg). |
| 31 | + |
| 32 | +### Including assets in solution packages |
| 33 | + |
| 34 | +SharePoint Framework solution packages that contain assets, can be deployed to site collection app catalogs. Included assets will be deployed to a preconfigured document library in the same site collection as where the site collection app catalog is located. If the Office 365 Public CDN is configured, assets will be served from the CDN. Otherwise, assets will be served directly from the document library. |
| 35 | + |
| 36 | +> [!NOTE] |
| 37 | +> |
| 38 | +> A bugfix for correctly supporting assets packaging in site collection app catalogs is currently being rolled out and should be available on all tenants before the end of the calendar year 2017. |
| 39 | +
|
| 40 | +### Tenant-scoped deployment |
| 41 | + |
| 42 | +When deploying SharePoint Framework solutions that support tenant-wide deployment to a site collection app catalog, you will be prompted if you want to make this solution available to all sites in the organization. Despite the wording, if you check this box, the solution will be available immediately **only in the same site collection as where the app catalog is**. Other site collections in your organizations will not be able to use the solution. If you don't check this option, you will have to explicitly install the solution in your site, before you will be able to use it. |
| 43 | + |
| 44 | +## Current limitations |
| 45 | + |
| 46 | +### Application Lifecycle Management (ALM) APIs are not yet supported |
| 47 | + |
| 48 | +At this moment, it's not possible to use the recently released ALM APIs to manage the lifecycle of solutions in site collection app catalogs. This is currently being worked on and should be available in the early 2018. |
| 49 | + |
| 50 | +## Configure and manage site collection app catalogs |
| 51 | + |
| 52 | +You can configure and manage site collection app catalogs using the SharePoint Online Management Shell. |
| 53 | + |
| 54 | +> [!NOTE] |
| 55 | +> |
| 56 | +> Before you can manage site collection app catalogs in your tenant, ensure that you have installed [SharePoint Online Management Shell](https://www.microsoft.com/en-us/download/details.aspx?id=35588) from November '17 or newer. |
| 57 | +
|
| 58 | +### Create a site collection app catalog |
| 59 | + |
| 60 | +> [!NOTE] |
| 61 | +> |
| 62 | +> Before running the following script, connect to your SharePoint Online tenant using the `Connect-SPOService` cmdlet. Also ensure, that you have a tenant app catalog created in your tenant. If you don't, the cmdlet will fail with the following error: |
| 63 | +> ```text |
| 64 | +> Cannot invoke method or retrieve property from null object. Object returned by the |
| 65 | +> following call stack is null. "TenantAppCatalog |
| 66 | +> RootWeb |
| 67 | +> GetSiteByUrl |
| 68 | +> new Microsoft.Online.SharePoint.TenantAdministration.Tenant() |
| 69 | +> " |
| 70 | +> ``` |
| 71 | +
|
| 72 | +To create a site collection app catalog, use the `Add-SPOSiteCollectionAppCatalog` cmdlet passing the site collection where the app catalog should be created as the `-Site` parameter. |
| 73 | +
|
| 74 | +```powershell |
| 75 | +# get a reference to the site collection where the |
| 76 | +# site collection app catalog should be created |
| 77 | +$site = Get-SPOSite https://contoso.sharepoint.com/sites/marketing |
| 78 | +
|
| 79 | +# create site collection app catalog |
| 80 | +Add-SPOSiteCollectionAppCatalog -Site $site |
| 81 | +``` |
| 82 | +
|
| 83 | +After executing this script, the **Apps for SharePoint** library will be added to your site collection where you will be able to deploy SharePoint add-ins and SharePoint Framework solutions. |
| 84 | + |
| 85 | +### Disable the site collection app catalog |
| 86 | + |
| 87 | +> [!NOTE] |
| 88 | +> |
| 89 | +> Before running the following script, connect to your SharePoint Online tenant using the `Connect-SPOService` cmdlet. |
| 90 | +
|
| 91 | +To disable the site collection app catalog in your site collection, use the `Remove-SPOSiteCollectionAppCatalog` cmdlet passing the site collection where the app catalog should be disabled as the `-Site` parameter. Alternatively, if you have your site collection's ID, you can use the `Remove-SPOSiteCollectionAppCatalogById` cmdlet instead. |
| 92 | + |
| 93 | +> [!NOTE] |
| 94 | +> |
| 95 | +> Despite the naming, the `Remove-SPOSiteCollectionAppCatalog` and `Remove-SPOSiteCollectionAppCatalogById` cmdlets don't remove the site collection app catalog from the site collection. Instead, they disable it so that it's not possible to deploy or use any solutions deployed in it. |
| 96 | +
|
| 97 | +```powershell |
| 98 | +# get a reference to the site collection in which |
| 99 | +# the site collection app catalog should be disabled |
| 100 | +$site = Get-SPOSite https://contoso.sharepoint.com/sites/marketing |
| 101 | +
|
| 102 | +# disable the site collection app catalog |
| 103 | +Remove-SPOSiteCollectionAppCatalog -Site $site |
| 104 | +``` |
| 105 | + |
| 106 | +After executing this script, the **Apps for SharePoint** library will be still visible in your site collection, but you will not be able to deploy or use any solutions deployed in it. |
| 107 | + |
| 108 | +## Considerations |
| 109 | + |
| 110 | +### Governance |
| 111 | + |
| 112 | +Currently, it's not possible to list all site collections in the tenant that have the site collection app catalog enabled. |
| 113 | + |
| 114 | +### Security |
| 115 | + |
| 116 | +Before deploying solutions to site collection app catalogs, site collection administrators should verify that these solutions meet organizational policies. Although solutions installed in site collection app catalogs can only be used in these particular site collections, they can potentially access resources from other sites in the tenant so administrators should ensure that the solutions they are about to deploy work as intended. |
0 commit comments