Forum Discussion
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?
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
- VesaJuvonen
Microsoft
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.
- florianwachterBrass 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
Microsoft
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.
- Rahul SuryawanshiCopper ContributorVesaJuvonen - Any insight on this would be appreciated.
- VesaJuvonen
Microsoft
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);
- tcelebiogluCopper Contributor
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?