Get a list of installed applications using the client object model

I'm trying to find some example, a resource that explains how to get a list of installed applications in a SharePoint 2013 environment using the Client Object Model. So far I have not found anything.

Could you share some links if you know what explains:

  • How to get a list of applications installed on a SharePoint 2013 website using the SP2013 managed client object model.

  • How to get a list of applications installed on a SharePoint 2013 network using WCF or REST. - I would really like to know how to do this, because I need to create WebPart in SP 2010, which lists the applications installed in our SP 2013 Office 365 package. Ru.

+4
source share
3 answers

You can get them from here:

https://<your_site_collection>/_api/web/AppTiles?$filter=AppType eq 3 

This is a REST service.

I believe the correct managed CSOM class

 Microsoft.SharePoint.Client.AppTileCollection 

found in ..

https://msdn.microsoft.com/en-us/Library/microsoft.sharepoint.client.apptilecollection.aspx

+3
source

In the SharePoint 2013 / Online CSOM API, the AppCatalog class provides query capabilities to discover installed applications, in particular the AppCatalog.GetAppInstances method retrieves installed instances of the application.

Example

 using (var ctx = ClientContext(webUri)) { var apps = AppCatalog.GetAppInstances(ctx, ctx.Web); ctx.Load(apps); ctx.ExecuteQuery(); //print info foreach (var app in apps) { Console.WriteLine("Name: {0},InstanceId: {1},Status: {2}", app.Title,app.Id, app.Status); } } 
+2
source

I only know about SharePoint Online 2013, but for this application are listed on a dedicated SharePoint site:

 https://<tenancyname>.sharepoint.com/sites/AppCatalog 

You should be able to connect to the list there using CSOM or REST.

Not sure what will answer your question, but maybe it gives some pointers?

0
source

Source: https://habr.com/ru/post/1486327/


All Articles