Reuse a Deleted SharePoint Site Name and Site Url in SharePoint Online

Prepared based on the below articles

https://www.c-sharpcorner.com/article/reusing-a-deleted-sharepoint-online-team-site-name/

https://morgantechspace.com/2018/07/how-to-reuse-deleted-sharepoint-site-url.html

---------------------------------------

When you delete a SharePoint Site from Office 365, by default the deleted site will be retained in the Site Collection Recycle Bin for 93 days (Retention Period) and if you have deleted a site collection, then the site collection will be retained in Tenant Recycle Bin.

The deleted sites are automatically emptied from the Site Collection/Tenant Recycle Bin after the retention period. You can restore a deleted site before this retention period time end.


Scenario 1:

Consider that you have deleted a team site and you want to create another site with same name and site url. In this case, you can create a site with the same name but you can’t reuse the deleted site url until the deleted site exists in Recycle Bin.

If you are creating another site collection from SharePoint Online Admin portal, then you will get the validation error The site collection already exists. Please enter a different address. . Under this error message you can also see the option Permanently delete the site collection from the recycle bin and continue., you can check this option and proceed to remove the deleted site from Recycle Bin and create a site collection with same site url.

Scenario 2:

Consider that you have a Office 365 group that named as TestO365Group and the O365 group should have a associated team site (https://o365domain.sharepoint.com/sites/TestO365Group). If you delete this O365 group, it will also delete its associated site, both the group and site will be moved into Recycle Bin. Now you can create another O365 group with same name and email alias (group email address), but it will not create the associated team site with same url and it will place a numeric number after the site name in the URL (For example: https://o365domain.sharepoint.com/sites/TestO365Group2). So you have to remove the deleted site first from Recycle Bin to have the same group site url.

Manually deleting the sites from Recycle Bin will be a tough task. So you can use the SharePoint Online Management Powerhsell cmdlet Remove-SPODeletedSite to remove the deleted sites from Recycle Bin.

Before proceed Install and Connect SharePoint Online PowerShell Module, then run the below command to remove a deleted site.

How to resolve
  • We need to use online Powershell to fix the same.
  • Open SharePoint Online Management shell, and connect your tenant which does have SA permission
  • Connect to the admin site through SPOService
  •  Connect-SPOService -Url https://test-admin.sharepoint.com/ -Credential ravi@domain.com
  • Once connected, Use Get-SPODeletedsite command see, below, it will result in showing you all the deleted sites.

  • We have to remove this site from here as well, to reuse the deleted site name as URL.
  • Use Remove-spodeletedsite – identity SiteURL or id see below for more details

Now, we will try to create a site with the same name and see how it’s going following the same steps as we did above. Go to admin center > Active Site > create > select Template.



Comments

Popular posts from this blog

SharePoint 2016 and 2019 Ports

PsConfig step by step /Configuration Wizard. “Upgrade Available” vs “Upgrade required”

Clear fields based on drop-down values in PowerApps