🎉 Our Office 365 Reporting Tool is now available in Azure Marketplace 🚀
This website uses cookies to improve your experience. We'll assume you're ok with this. Know more.
SharePoint Online

How to Get All Deleted Sites in SharePoint Online

SharePoint Online sites enable team collaboration through file sharing, co-authoring documents, and more. Accidental deletion of these sites can halt critical project workflows, disrupt team collaboration, and result in the loss of important SPO site contents. To prevent such disruptions, it is crucial to quickly identify and restore deleted sites before permanent removal. This guide helps you to find and manage deleted SharePoint Online site collections in your organization to maintain an uninterrupted workflow.

Using SharePoint Admin Center

Microsoft 365 Permission Required
SharePoint Admin Least Privilege
Global Admin Most Privilege
  • Log in to the SharePoint admin center.
  • Navigate to Sites»Deleted sites.
  • Here, you will see all deleted SharePoint site collections in your organization that are still within the 93-day retention period.
Using SharePoint Admin Center

Using Windows PowerShell

Microsoft 365 Permission Required
SharePoint Admin Least Privilege
Global Admin Most Privilege
  • Connect to the SharePoint Online PowerShell using the below cmdlet.
  • Windows PowerShell Windows PowerShell
     Connect-SPOService -Url https://<TentantName>-admin.sharepoint.com
    #Replace <TenantName> with your organization's tenant name.
  • Run the below cmdlet to retrieve all deleted SharePoint site collections in Microsoft 365.
  • Windows PowerShell Windows PowerShell
     Get-SPODeletedSite  -Limit All
Using Windows PowerShell
  • The above cmdlet gets all deleted SharePoint sites along with details, such as storage quota, deletion time, and the number of days remaining before permanent deletion.

Gain Full Visibility into SharePoint Site Deletions for Faster Restoration and Control!

Managing SharePoint Online can be challenging due to its versatility. AdminDroid’s SharePoint Online reporting tool simplifies the process by providing insightful reports on site creation, deletion, inactive sites, sharing settings, etc. This helps admins to effectively monitor and make data-driven decisions to ensure a secure SharePoint environment.

Monitor SharePoint Site Creation to Prevent Unwanted Sites

Use the recently created SPO sites report to identify and delete redundant sites to maintain a safe and clean SharePoint environment.

Find and Delete Unused SPO Sites to Free Up Storage Space

Track inactive SharePoint sites in your organization and archive or remove them to reclaim storage space and enhance system efficiency.

Get Instant Alerts on SharePoint Site Collection Admin Addition

Set an alert on the site collection admin added report to stay informed about new site admins in SharePoint Online to ensure that only authorized users have the power to delete sites.

Automated Tracking of SharePoint Site Storage

Schedule the SPO site usage summary report at specific intervals to identify and remove unwanted sites with high storage usage while ensuring critical sites have adequate space.

Verify Successful Restoration of Site Content After Deletion

Utilize the restored SharePoint files report to verify that all critical site content has been restored after accidental deletions and confirm the restoration is complete.

Review Site Sharing Configuration of SPO Sites to Avoid Misconfiguration

Monitor site sharing configuration of all your SPO sites to restrict unwanted sharing and safeguard critical sites contents.

In conclusion, the AdminDroid SharePoint Online management tool simplifies SharePoint management by providing detailed reports to track site permission changes, owner updates, file deletion access, and more. It thoroughly examines every aspect of SharePoint Online, captures all SPO site activities, and helps enhance the protection of the SharePoint environment.

Explore a full range of reporting options

Important Tips

Configure Microsoft 365 backup policy for sensitive SharePoint sites to ensure recovery in case of accidental deletions.

Utilize the Preservation Hold Library by applying a retention policy on important SharePoint sites to preserve site contents after unauthorized deletions for compliance and recovery purposes.

Avoid granting high-level permissions, such as site owner or site admin unless necessary to prevent accidental deletion of SharePoint sites.

Common Errors and Resolution Steps

The following are common errors and troubleshooting hints while managing deleted SharePoint sites in SharePoint Online.

Error Connect-SPOService: Could not connect to SharePoint Online.

This error occurs due to an incorrect SharePoint Online URL being used during the connection attempt.

Fix Ensure the correct URL is used to connect to SharePoint Online.

Error Remove-SPOsite : This site belongs to a Microsoft 365 group. To delete the site, you must delete the group.

This error occurs in PowerShell when you delete a Microsoft 365-connected SharePoint site. The team site cannot be deleted directly using PowerShell before deleting the associated group.

Fix Connect to the Exchange Online PowerShell module to delete the Microsoft 365 group.
Remove-UnifiedGroup –Identity <GroupName>
#Replace the <GroupName> with the name of the group you wish to delete.

Error The root site can’t be deleted.

This error occurs in the SharePoint admin center when attempting to delete a root site.

Fix Replace the current root site with another site in SharePoint Online before deleting it.

Error A compliance policy is currently blocking this site deletion.

This error occurs when you try to delete a SharePoint site that has an active retention policy applied.

Fix Temporarily disable the retention policy or exclude the site from the policy before attempting to delete it.

Error New-SPOsite : A site already exists at url <SiteURL>.

This error occurs when attempting to create a site with the same URL as a recently deleted site.

Fix Wait 24 hours after permanently deleting a SharePoint site before using the same URL for a new site

1. What happens when a SharePoint site is deleted?

Have you ever wondered what happens when a SharePoint site is deleted? It might seem like a simple action, but there’s more to it. When you delete a SharePoint site, it goes to the recycle bin for 93 days before it’s permanently deleted. During this time, you can restore the site or delete it permanently. Here’s a simple breakdown of what happens when a SharePoint site is deleted.

Behaviour of communication site deletion

  • When a communication site is deleted, it will be listed to the Deleted sites section in the SharePoint admin center and the site collections is moved to site collection recycle bin .
  • During the retention period of 93 days, you can restore the site along with all content and settings.
  • If not restored, the site and all associated data are permanently deleted.
  • You can also permanently delete the site from the recycle bin using PowerShell or the admin center.

Behaviour of team sites deletion

  • When you delete a Microsoft 365 group-connected team site, it will be listed in the the Deleted Sites section in the SharePoint admin center. The associated Microsoft 365 group is also deleted along with it and placed in the Deleted Groups section of the Microsoft 365 admin center.
  • This deletion also removes all Microsoft 365 group-connected resources, such as Outlook mailbox, the group calendar, Microsoft Teams channel discussions, and more.
  • If you restore a deleted site within 30 days, the associated Microsoft 365 group and all its resources will also be restored. Similarly, restoring a deleted Microsoft 365 group will also restore its corresponding SharePoint site.
  • If the site is restored after 30 days (but within 93 days), only the SharePoint site can be recovered. The associated Microsoft 365 group and its resources are permanently deleted after 30 days. After 93 days, the SharePoint site will also be permanently deleted with no recovery option.

What happens when SharePoint site content is deleted?

SharePoint uses a two-stage Recycle Bin to manage deleted site content like folders, files, folders, and documents.

The total lifespan of deleted files in the SharePoint site is 93 days across both recycle bins. For example, if a file is deleted from the first stage Recycle Bin on day 40, it will be transferred to the second stage Recycle Bin and kept for the remaining 53 days of the total 93-day retention period.

2. How to delete a SharePoint Site in Microsoft 365?

When you encounter storage issues in SharePoint Online, the most effective solution is to identify and delete unnecessary or inactive SharePoint sites within your organization. Deleting inactive sites also reduce the risk of compliance issues related to outdated or unnecessary data.

Delete a SharePoint site using SharePoint admin center

You need to have global admin or SharePoint admin permission to delete a SharePoint site using the admin center.

  • Go to the Active sites page in the SharePoint admin center.
  • Select the site you want to remove and click Delete.
  • Click Delete again on the confirmation page to remove the SharePoint site.
site-deletion-sharepoint-admin-center

How to delete multiple SharePoint Sites in bulk

Select all the desired sites you want to delete from the Active Sites page. Click the Delete option in the Bulk Edit dropdown at the top. Hit Delete to confirm the action.

Note: When you select Microsoft 365 group-connected team sites for bulk deletion, a confirmation prompt will appear. Select the Delete group-connected team sites and all their resources checkbox and click Delete.

Remove SharePoint site collection using PowerShell

  • Connect to the SharePoint Online PowerShell module using the cmdlet below.
    Connect-SPOService -Url https://<YourTentantName>-admin.sharepoint.com
  • Then, execute the following cmdlet to delete the SharePoint site.
    Remove-SPOSite -Identity <SiteURL>
    #Replace <SiteURL> with the actual URL of the site you want to delete

Note: The above method only applies to deleting SharePoint site collections. To delete a subsite, a different method is needed.

3. How to restore a deleted SharePoint site in Microsoft 365?

Accidental or intentional deletion of SharePoint sites can result in important data loss and cause delays in ongoing projects. Whether due to administrative errors, project changes, or organizational shifts, swift recovery of the site is essential to minimize downtime and workflow disruptions. Here are some methods to restore a deleted SharePoint site from the Recycle bin.

Restore a deleted SharePoint site using the SharePoint admin center

  • Sign in to the SharePoint admin center and navigate to Sites»Deleted sites.
  • Select the SharePoint site you want to restore, and then click the Restore option at the top.
  • Click Restore again in the dialog prompt to complete the restoration.
restore-sharepoint-sites-spo-admin-center

Restore deleted SharePoint sites using PowerShell

Connect to the SharePoint Online PowerShell Module. Then execute the following cmdlet to restore the SharePoint site from the recycle bin.

Restore-SPODeletedSite  -Identity <SiteURL>
#Replace <SiteURL> with the URL of the deleted site

Restore deleted SharePoint Online sites in bulk

Restoring multiple SharePoint sites individually can be a time-consuming task. To streamline the process, you can restore multiple SharePoint sites in bulk using PowerShell.

To accomplish this, create a CSV file with the list of the SPO site's URL that needs to be restored.

bulk-restore-sites-url

Once the CSV file is created, execute the following cmdlet to restore all deleted SharePoint Online sites from the list.

Import-Csv <FilePath> | ForEach-Object {Restore-SPODeletedSite -Identity $_.SPOsiteURL}
#Replace the <FilePath> with the actual path to your CSV file containing the site URLs.

4. How to delete a SharePoint site permanently?

Permanent deletion of SharePoint sites may be necessary when they are no longer needed or when a fresh site must be created using an existing URL. This process helps streamline your environment, eliminate unused sites, and create a clutter-free space. Follow the steps below to remove the SPO site from the recycle bin.

Delete a SharePoint site permanently in the SharePoint admin center

  • Navigate to the Deleted sites page in the SharePoint admin center
  • Select the site you want to delete and click Permanently delete on the toolbar.
  • Click Delete on the dialog box “Permanently delete site” to confirm the process.
permanent-site-delete-admin-center

Note: You can’t permanently delete the SharePoint site associated with a Microsoft 365 group using the admin center.

Permanently delete a SharePoint site using PowerShell

Make sure to connect to the SharePoint Online Management Shell and execute the following cmdlet to permanently delete a site that has already been deleted.

Remove-SPODeletedSite -Identity <SiteURL>
#Replace <SiteURL> with the actual URL of the site you want to permanently delete.

Kickstart Your Journey With
AdminDroid

Your Microsoft 365 Companion with Enormous Reporting Capabilities

Download Now
User Help Manuals Compliance Docs
x
Delivering Reports on Time
Want a desired Microsoft 365 reports every Monday morning? Ensure automated report distribution and timely delivery with AdminDroid's Scheduling to your email anytime you need.
Delivering Reports on Time
Schedule tailored reports to execute automatically at the time you set and deliver straight to the emails you choose. In addition, you can customize report columns and add inteligent filtering to the activities just from the previous day to suit your Microsoft 365 report requirements.
Set It, Schedule It, See Results- Your Reports, Your Way, On Your Time!
Time Saving
Automation
Customization
Intelligent Filtering
Give Just the Right Access to the Right People
Grant fine-tuned access to any Microsoft 365 user with AdminDroid’s Granular Delegation and meet your organization’s security and compliance requirements.
Give Just the Right Access to the Right People
Create custom roles loaded with just the right permissions and give access to admins or normal users within AdminDroid. The result? A streamlined Microsoft 365 management experience that aligns your organization's security protocols and saves your invaluable time and effort.
Align, Define, Simplify: AdminDroid's Granular Delegation
Smart Organizational Control
Effortless M365 Management
Simplified Access
Advanced Alerts at a Glance
Receive quick notifications for malicious Microsoft 365 activities. Engage with the AdminDroid’s real-time alert policies crafted to streamline your security investigations.
Advanced Alerts at a Glance
Stay informed of critical activities like suspicious emails and high-risk logins, bulk file sharing, etc. Through creating and validating ideal alert policies, AdminDroid provides a comprehensive approach to real-time monitoring and management of potential threats within your organization.
AdminDroid Keeps You Always Vigilant, Never Vulnerable!
Proactive Protection
Real-time Monitoring
Security Intelligence
Threat Detection
Merge the Required Data to One Place
Combine multiple required columns into one comprehensive report and prioritize the information that matters most to you with AdminDroid’s Advanced Column Customization.
Merge the Required Data to One Place
This column merging capability offers a flexible way to add different columns from various reports and collate all the essential data in one place. Want to revisit the customized report? Save it as a 'View’, and your unique report is ready whenever you need it.
Merge with Ease and Save as Views!
Custom Reporting
Unique View
Desired Columns
Easy Data Interpretation
Insightful Charts and Exclusive Dashboards
Get a quick and easy overview of your tenant's activity, identify potential problems, and take action to protect your data with AdminDroid’s Charts and Dashboards.
Insightful Charts and Exclusive Dashboards
With AdminDroid charts and dashboards, visualize your Microsoft 365 tenant in ways you've never thought possible. It's not just about viewing; it's about understanding, controlling, and transforming your Microsoft 365 environment.
Explore Your Microsoft 365 Tenant in a Whole New Way!
Executive overviews
Interactive insights
Decision-making
Data Visualization
Efficient Report Exporting for Microsoft 365
Downloading your reports in the right file format shouldn’t be a hassle with AdminDroid’s Report Export. Experience seamless report exporting in various formats that cater to your needs.
Efficient Report Exporting for Microsoft 365
Navigate through diverse options and export Microsoft 365 reports flawlessly in your desired file format. Tailor your reports precisely as you need them and save them directly to your computer.
Take Control, Customize and Deliver- Your Office 365 Data, Exported in Your Way!
Easy Export
Seamless Downloading
Data Control
Manage Microsoft 365

Get AdminDroid Office 365 Reporter Now!