SharePoint Online CSOM for creating Site Collection App Catalog

Occasional Contributor

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?

8 Replies
@Vesa Juvonen - Any insight on this would be appreciated.
best response confirmed by Rahul Suryawanshi (Occasional Contributor)


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.



Thanks Vesa! I will give a try and update you if it helps.

I confirm that below code works as expected. I used SharePoint App credentials which has permissions on tenant to execute the code and its working as expected. 


Thanks Vesa!


using (ClientContext clientContext = authManager.GetClientContextWithAccessToken(siteURL))
                catch (Exception ex)

                    Console.WriteLine("Exception: " + ex.ToString());



@Vesa Juvonen 


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.




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?

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.

@Vesa Juvonen : 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?





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.