How to get the list of custom apps in App catalog using Powershell?

Hello Sharepointers.

Below are the powershell script get the list of custom apps in App catalog using Powershell

using (ClientContext context = new ClientContext("https://youroffice-admin.sharepoint.com")) 
{ 
    
    Tenant tenant = new Tenant(context);
    tenant.Context.Load(tenant);
    tenant.Context.ExecuteQueryRetry();


    var appCatalogAppInfoCollection = tenant.GetAppInfoByName(string.Empty);
    tenant.Context.Load(appCatalogAppInfoCollection);
    tenant.Context.ExecuteQueryRetry();

    foreach (var app in appCatalogAppInfoCollection)
    {
        Debug.WriteLine("APP: " + app.Name);
        Debug.WriteLine("Source: " + app.Source);
    }
}

Happy Sharepointing.

Leave a Reply

Your email address will not be published. Required fields are marked *