How to Deploy Provider Hosted Apps (Add-Ins) by App Stapling in SharePoint Office 365

Sathish Nadarajan
 
Solution Architect
October 12, 2016
 
Rate this article
 
Views
5907

In the earlier articles, we saw how to deploy APPs programmatically. In this Article, as a continuation, let us see how to make an APP available for all the Existing Sites in the SharePoint Tenant and even the new sites which will be created in future will also have this APP. This concept is known as APP Stapling. Even this also have its own limitations.

The major limitation is, the APP Installed and Un Installed Events will not be triggered. As an output, this cannot be directly used for remote event receivers. We can use this for remote event receivers with some sort of work around. But they are logical implementation. Now, in this article, let us focus on the Technical implementation alone.

Now, I am focusing on how to implement App Stapling alone. The Pros and Cons of APP Stapling can be read from many sources.

In simple words, instead of deploying the APP in any Site Collection, we are going to deploy the APP on the APP Catalog Site itself. In Office 365, APP Catalog is a special site collection, on which the APPS will be uploaded and will be available to deploy on all the site collections within the tenant.

With this brief introduction, let us see how to do this.

1. Prepare the APP Package.

2. Login to the APP Catalog Site Collection.

3. In my case, it is https://******.sharepoint.com/sites/AppCatalog

4. Click on “APPs for SharePoint”

clip_image002

5. Upload the APP.

clip_image004

6. Go to Site Contents.

7. Click on Add an APP

clip_image006

8. The Uploaded APP will be listed on the page.

clip_image008

9. Add the APP.

10. Trust it.

clip_image010

11. Now, the APP got Installed.

clip_image011

12. Click on the Eclipse.

13. Select the Deployment.

clip_image013

14. We will be seeing the Manage APP Deployments Screen.

clip_image015

15. clip_image017

16. On which Select the Criteria. In my case, I wanted to deploy this APP on All the Community Sites. Hence, I chose the Community Sites on the Site Templates and Click OK.

17. clip_image019

18. Prompted with Trust again. Click Trust.

clip_image021

19. Now, let me go back to my Community Site. The app will be listed on the Site Contents.

20. clip_image023

21. This will be deployed, even if we create a new Community Site also.

Hope this is useful for the developers who are dealing with a huge number of sites in their tenant.

Happy Coding,

Sathish Nadarajan.

Author Info

Sathish Nadarajan
 
Solution Architect
 
Rate this article
 
Sathish is a Microsoft MVP for SharePoint (Office Servers and Services) having 15+ years of experience in Microsoft Technologies. He holds a Masters Degree in Computer Aided Design and Business ...read more
 

Leave a comment