2

I'm unable to remove site collections that were provisioned alongside an Office 365 group.

I tried two approaches.

  1. I deleted the O365 group in the O365 Admin Center. The group is gone but the opening the site collection produces a 403 forbidden error

  2. Used Remove-PnPUnifiedGroup to remove the O365 group. This was also successful. However, I'm unable to delete the SC getting the same error message. I can't even connect to the site collection in question with Connect-PnPOnline (403 forbidden)

Using Remove-SPOSite gives a slightly different error message (Access to this Web site has been blocked).

Any ideas how I can remove those leftover site

Thanks in advance for your reply.

3 Answers 3

3

The solution for the 403 error was to unlock the site collection.

Set-SPOSite -Identity <URL> -LockState unlock

After that the site collection could be removed with

Remove-SPOSite
2

In the Office 365 admin center, when you delete a SharePoint Online site collection, it is moved to the SharePoint Site Collection Recycle Bin where it will remain and can be restored for the next 30 days. To permanently delete a SharePoint Online site collection and all of its subsites without the use of the Recycle Bin, you need to use PowerShell. This scenario shows you how to immediately and permanently delete a SharePoint Online site collection.

To begin, you must connect to SharePoint Online. See Connect to SharePoint Online PowerShell for instructions.

To immediately and permanently delete a site collection, fill in the site collection's URL between the double-quotes, removing the instruction text and the < and > characters.

$siteCollURL="<URL of the SharePoint Online site collection>"
Remove-SPOSite -Identity $siteCollURL -NoWait
Start-Sleep -s 20
Remove-SPODeletedSite -Identity $siteCollURL

Run the resulting block of commands at the SharePoint Online Management Shell prompt.

Reference:

1
  • Thanks but site collections created with by an O365 group are currently not managed through the SPO admin center i.e. they don't show up. Furthermore, I cannot even delete the site as initially mentioned (403 error). Commented Dec 1, 2017 at 14:51
0

According to this documentation the deletion of the site collection may not be instant. So I would give it some time and check again.

When you delete a group, there can be a delay before the site is removed from SharePoint.

2
  • Thanks. I've already waited 36 hours. I will check back on Monday. Commented Dec 1, 2017 at 14:51
  • Hi. Reporting back. Unfortunately, I'm still getting the 403 error and I'm unable to access the site collections via PowerShell. Any ideas how to remove the leftovers? Thanks. Commented Dec 4, 2017 at 14:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.