Skip to content

Instantly share code, notes, and snippets.

@gautamdsheth
Created January 10, 2019 10:10
Show Gist options
  • Select an option

  • Save gautamdsheth/e5ce6abb1db31f9547dc7ec2a52fc1d8 to your computer and use it in GitHub Desktop.

Select an option

Save gautamdsheth/e5ce6abb1db31f9547dc7ec2a52fc1d8 to your computer and use it in GitHub Desktop.
Determine if site collection app catalog exists or not
var appcatalog = clientContext.Site.RootWeb.SiteCollectionAppCatalog;
clientContext.Load(appcatalog);
clientContext.ExecuteQueryRetry();
if (appcatalog.ServerObjectIsNull)
{
// app catalog doesn't exist
}
else
{
// app catalog exists
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment