Forum Discussion

Rahul Suryawanshi's avatar
Rahul Suryawanshi
Copper Contributor
Feb 19, 2018
Solved

SharePoint Online CSOM for creating Site Collection App Catalog

Hi All,

I know that there is PowerShell cmdlets to create and remove site collection app catalog. Question is are there CSOM APIs available to do the same?

  • VesaJuvonen's avatar
    VesaJuvonen
    Feb 26, 2018

    Hi,

    you should be able to do that with following CSOM commands as long as you are using relatively new CSOM NuGet version. You will need to have owner privileges to the tenant app catalog site collection to make this call.

     

    Web.TenantAppCatalog.SiteCollectionAppCatalogsSites.Add(this.Site.Url);

8 Replies

  • There is currently no CSOM to create app catalog for a tenant. We are potentially looking into making this happen by the end of 2019. No exact ETA though at this point.

    • florianwachter's avatar
      florianwachter
      Brass Contributor

      VesaJuvonen : Do you have an update on this?

       

      Are there still plans to include this in CSOM? If not, is there an option to create a tenant app catalog using PowerShell or CLI?

       

      Thanks

      • VesaJuvonen's avatar
        VesaJuvonen
        Icon for Microsoft rankMicrosoft

        florianwachter 

         

        Plans still do exists, but no ETA. Having an API to make this happen is also pre-requisite for supporting it in PowerShell or in CLI, as they will be then calling that API. 

    • VesaJuvonen's avatar
      VesaJuvonen
      Icon for Microsoft rankMicrosoft

      Hi,

      you should be able to do that with following CSOM commands as long as you are using relatively new CSOM NuGet version. You will need to have owner privileges to the tenant app catalog site collection to make this call.

       

      Web.TenantAppCatalog.SiteCollectionAppCatalogsSites.Add(this.Site.Url);

      • tcelebioglu's avatar
        tcelebioglu
        Copper Contributor

        VesaJuvonen 

        Hi,

        i am facing similar problem, i need to create tenant app catalog site by code (CSOM for my case).

        Your solution works if that site exists and adds particular existing site as an app catalog site.

         

        Web.TenantAppCatalog.SiteCollectionAppCatalogsSites.Add(this.Site.Url);

         

        But i need to create tenant app catalog site and i couldn't find any solution to do that by any api. Is there a solution for that?

Resources