2

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

3

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 – user3025493 Jul 13 '18 at 12:05
0

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

Publish-PnPApp

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.