Hello everybody.
We have a task to prevent all site collections from deletion on the whole tenant.
So nobody will be able to delete them wuth 'Delete this site' button in the site settings.
(but users still should be able to delete subsites)
The only way to delete site collection should be through Tenant Administration (tenant-admin.sharepoint.com)
We have 2 options:
1. JS Custom Action, which will hide this button. As this custom action will be added only on the site collection's main web - all subsites will still have this button
2. Event Listener on 'site deleting' added to the site collection. Still, subsites are available to delete.
But issue is - how should we proceed new site collections?
So is there some event receiver for 'Site collection created' which can be added on the Tenant, so it will be fired on site collection created and add all needed custom on this collection.