How to Deploy an App to App Catalog in SharePoint Online?
Requirement: Deploy an app to App Catalog in SharePoint Online.
How to add an App to SharePoint Online App Catalog Site?
The App Catalog is a centralized repository to manage and deploy custom apps in SharePoint. Apps (either SPFx .sppkg or Add-in .app file) to be uploaded and deployed there – is a prerequisite to use them in all SharePoint Online sites of the tenant, instead of adding and deploying an app to each individual site collection in the tenant. To add an app to the SharePoint Online app catalog, follow these steps:
- Login to SharePoint Admin Center >> Click on “More features” >> Click on “Open” button under “Apps”
- Click on the “App Catalog” link to open the app catalog site (If the app catalog site is not created already, you’ll get a page to create!)
- Click on the “Apps for SharePoint” link in the left navigation of the app catalog site.
- Now, you can upload the app file by clicking on “Files” >> Upload Document >> Browse and selecting the SharePoint App. Here, in my case, I’ve selected “pzl-script-editor.sppkg” for the modern script editor web part functionality in SharePoint Online.
- Once uploaded, you’ll get a prompt to deploy the app. Once done, your custom app should be available to use for all sites in the tenant.
PnP PowerShell to Add an App to SharePoint Online App Catalog
We can use PnP PowerShell to deploy an app to the SharePoint Online app catalog site. Here is the script:
#Parameters
$AppCatalogURL = "https://crescent.sharepoint.com/sites/Apps"
$AppFilePath = "C:\Temp\script-editor.sppkg"
#Connect to SharePoint Online App Catalog site
Connect-PnPOnline -Url $AppCatalogURL -Interactive
#Add App to App catalog - upload app to sharepoint online app catalog using powershell
$App = Add-PnPApp -Path $AppFilePath
#Deploy App to the Tenant
Publish-PnPApp -Identity $App.ID -Scope Tenant
Now, we’ve deployed a custom app to the SharePoint Online app catalog. How about adding an app from the SharePoint Store to the SharePoint App catalog?
Add an App from “SharePoint Store” to App Catalog:
Similarly, to add an app from SharePoint App Store to the app catalog site, do the following:
- Log in to your tenant App catalog site >> Click on Settings gear >> Add an App
- Click on “SharePoint Store” from the left navigation
- Search and pick the app from the marketplace. E.g. I’ve picked “Adobe Sign for SharePoint Online”
- Click on “Add IT” and follow the wizard to deploy the App to the App catalog site.
Once you have deployed either your custom app/3rd party app to the SharePoint Online app catalog, adding an app to a site is a straightforward process. You can create app instances in any site under the tenant by going to settings >> Add an app menu.
If your custom app contains any web parts, you’ll get them on the edit page. Some custom apps extend the functionality and may not have web parts. Here is how the add an app page looks like with the two apps we’ve deployed in my case:
To add an app to the SharePoint Online site, You need at least site owner access rights. To add an app to the SharePoint Online site, use: How to Add an App to SharePoint Online Site using PowerShell?