Forum Discussion
Permissions to delete Site Collection using CSOM
Hi Sorry, for my late answer.
You are correct: We are trying to delete Site Collection on Prem using CSOM.
We use the PnP Partner Pack with SP2016 and try to avoid any server side code. To cover the full life cycle of a project room, it shall be deleted in the end. For various reasons we can't use the site policy feature to achieve this.
In the blog post that I linked it is explained, which functions are available on Premise when you use the Tenant API with SP2013 (and 2016). It is said that the method to delete site collections is supported. And in fact we can call the method on prem but we always get an access denied even though the account is site collection admin in the tenant site, the site that shall be deleted. We even tried farm-admin and App-Only-Auth, but nothing worked for us.
Currently I believe that the method to delete site collections in CSOM is available but the needed permission level is not available on Prem. Can anyone confirm this?