7

We have requirement that SharePoint hosted app need to add/remove in site when site creation(Site has been created using JSOM). I did't find any article regarding add app programmatically using JSOM.

My app is in appcatalog. I need to add it in site when site provisioning. usually we will do using UI [Site -> Site Content -> Add an app].

Is this possible in JSOM? or can i achieve this in any other way?

1

For now, there is no supported method/function in JSOM which can help you to install app programmatically. As per the comment of Swayam, you can use CSOM to deploy an app.

CSOM has a built in method Web.LoadAndInstallApp to install app.

Please refer to this link for more details: How to add a custom app to a SharePoint Online site programmatically or you can also refer to this link: Office 365: Publish and deploy .app through PowerShell

Hope this will help you.

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.