Created
January 10, 2019 10:10
-
-
Save gautamdsheth/e5ce6abb1db31f9547dc7ec2a52fc1d8 to your computer and use it in GitHub Desktop.
Determine if site collection app catalog exists or not
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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