4

I have been trying hard to find any example, resource which explains how to get a list of installed apps in SharePoint 2013 environment using Client Object Model. So far I have found nothing.

Could you please share some links if you happen to know any that explains:

  1. How to get list of apps installed in a SharePoint 2013 web using SP2013 Managed Client Object Model.

  2. How to get list of apps installed in a SharePoint 2013 web using either WCF or REST service. -- I would really like to know how to do this as I need to create a WebPart in SP 2010 that lists apps installed in our SP 2013 Office 365 env.

Moon
  • 33,439
  • 20
  • 81
  • 132

3 Answers3

3

You can get them from here:

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

This is the REST service..

I believe the correct Managed CSOM class is

Microsoft.SharePoint.Client.AppTileCollection 

found at..

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

Michael Coxon
  • 5,311
  • 1
  • 24
  • 51
  • There is no REST API like '_api/web/AppTiles' in SP2013 on-premise. Not all the CSOM/SSOM methods are implemented as their REST counterparts. – Burst May 05 '17 at 11:30
2

In SharePoint 2013/Online CSOM API AppCatalog class provides querying capabilities for discovering installed Apps, in particular AppCatalog.GetAppInstances method retrieves the installed app instances.

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);
     }
}
Vadim Gremyachev
  • 57,952
  • 20
  • 129
  • 193
0

I only know about SharePoint Online 2013 but for that, the apps are listed in a special SharePoint site:

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

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

Not sure that answers your question but maybe it gives some pointers?

Julian Knight
  • 4,716
  • 2
  • 29
  • 42