Is it possible to add an app programatically automatically when new site is created? For example calling endpoint, automating click etc. SideLoading is not allowed in production

Edit: target Sharepoint 2016

2 Answers 2


Yes you can use the ALM Rest API, Its available in CSOM, Powershell aswell as Javascript.

  • Ah that seems good, but it is only for Sharepoint online right? I did not mention we have SP 2016 On Premise Jul 13, 2018 at 12:05

In your SharePoint 2016 you have a central app catalog. Solutions deployed to this app catalog, can be installed in any site collection.

Take a look at PnP PowerShell and list of commands. Install the module:

Install-Module SharePointPnPPowerShell2016

Useful commands:

Add-PnPApp -Path ./helloworld.sppkg

Install-PnPApp -Identity 66b00f6e-tw81-4ab7-8zx-e09c6f9132dc


Update-PnPApp -Identity 66b00f6e-tw81-4ab7-8zx-e09c6f9132dc

Remove-PnPApp -Identity 66b00f6e-tw81-4ab7-8zx-e09c6f9132dc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.