How to Add an App to SharePoint Online Site using PowerShell?

Requirement: Add an App to the SharePoint Online Site.

How to an App from App Catalog to the SharePoint Online Site?

Apps in SharePoint enable us to customize the SharePoint Online experience and better meet the business requirements. Installing apps in SharePoint Online is a simple process that any site owner or administrator can complete. Installing an app in SharePoint Online is a two-step process. First, the App must be added to the SharePoint Online App Catalog. Next, the App can be installed on the desired site.

To add an app from the SharePoint Online app catalog site, do the following:

  1. Login to your SharePoint Online site >> Click on Settings gear >> Add an App.
  2. Click on “From Your Organization” from the left navigation.
  3. Pick the App from your app catalog. For example, I’ve picked my custom app, “File Controller”.
  4. You may get a prompt to trust the App: Click on “Trust It” to proceed to add the App to your SharePoint Online site.
add an app to site in sharepoint online

You have to wait for a few moments while SharePoint is adding the App to the site. Wait and Refresh.

Add an App from the SharePoint App Store

To add an app from SharePoint App Store to the SharePoint Online site, do the following:

  1. Login to your SharePoint Online site >> Click on Settings gear >> Add an App.
  2. Click on “SharePoint Store” from the left navigation.
  3. Apps in the app store may be free or must be purchased. Search and pick the App from the marketplace. E.g., I’ve chosen “Adobe Sign for SharePoint Online”
  4. Click on “Add IT” and follow the wizard to deploy the App to your site.
add app to sharepoint online from market place

The App is added for use on your site from within your Apps page. The Added App extends SharePoint functionality/adds a web part as its intended purpose.

Add an App to Multiple Sites in SharePoint Online through App Catalog:

You can add an app to multiple sites from an App catalog site without requiring users to add it.

  1. Login to the SharePoint Online App Catalog site as an administrator
  2. Click on Settings >> Site contents. Make sure you are in classic UI by clicking on the “Return to classic SharePoint” link at the bottom-left.
  3. Select the ellipsis (…) next to the App you want to deploy to other sites, and select the ellipsis (…) again in the popup window. Select “Deployment”. deploy app to all sites from app catalog
  4. Enter the URL of the site collections to deploy the App and click Add. You can also select managed paths to deploy or select specific site templates. Click OK to start adding the App to sites under the selected criteria.
    bulk deploy apps from sharepoint online app catalog
  5. Click on the “Trust It” button to proceed to add the App.
  6. The App will be added to selected sites and appear on the site contents page.

PnP PowerShell to Install an App to SharePoint Online Site:

We can also add an app to the SharePoint Online site from the app catalog using PnP PowerShell script.

#Parameters
$SiteURL = "https://crescent.sharepoint.com/sites/Legal"
$AppName = "Modern Script Editor web part by Puzzlepart"

#Connect to SharePoint Online App Catalog site
Connect-PnPOnline -Url $SiteURL -Interactive

#Get the App from App Catalog
$App = Get-PnPApp -Scope Tenant | Where {$_.Title -eq $AppName}

#Install App to the Site
Install-PnPApp -Identity $App.Id

You need site owner permissions to be able to add apps to SharePoint Online! To add apps to the SharePoint Online App catalog site, use: How to Add an App to SharePoint Online App Catalog Site?

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

One thought on “How to Add an App to SharePoint Online Site using PowerShell?

  • Hello!
    Can I use “Install-PnPApp” if I connect with Azure Active Directory registered application?

    Thank you, Matjaz

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *