We have implemented a SharePoint site life cycle management process using Site Policies in a SharePoint Online tenant.
However, when a root web in a site collection is deleted using the site policy we have a bit of a problem, two different problems actually. Both of the problems originate from the fact that the site policy only deletes the root web, not the actual site collection. So the site collection remain as an “empty” shell.
Problem 1. This makes it quite hard to restore the deleted web. The web would normally end up in the recycle bin but that is inaccessible since there’s no root web to browse in the site collection. So- how do we restore a deleted root web? I’m even having a hard time reaching the site through PowerShell.
Problem 2. We end up with empty site collections. They can still be seen in the admin portal but if I try to manage it everything breaks since there’s no root web. We cannot create new site collections with the same name since the name is already taken etc. How do we get rid of these empty site collections.