How to Restore a Deleted Office 365 Group using PowerShell?

By Eddie Pinchasov – Product Director

MS Office 365 is witnessing massive adoption – one in five corporate employees use it.  A big reason behind it is its efficient collaboration mechanisms such as Teams, OneDrive, and SharePoint. A rather understated, but similarly powerful collaboration tool is Groups. In fact, Groups drives all teamwork across Office 365 – groups allow your employees to easily share and collaboratively work on documents, planners, roadmaps, calendars, etc. So what do you do when a Group is inadvertently deleted? How can you restore a deleted Office 365 Group, and ensure business continuity?

How to Restore a Deleted Office 365 Group using PowerShell ?

Step-by-step pointers below:

Consider that you have a SharePoint group MarketingO365

How to Restore a Deleted Office 365 Group using PowerShell

This group is used to grant permissions to members of Marketing O365 Members to a team site with important marketing data

Restore Office 365 Deleted Groups

Uh-oh! Someone accidentally deletes the group. How do you restore the group? Either by using the Exchange admin center or by using PowerShell. Here we will detail how to restore a group using PowerShell. Note that you must have Office 365 global administrator permissions or be a former owner of the deleted Office 365 group.

Step #1 Install the latest PowerShell version

For starters, it is mandatory to install the latest preview version of Azure Active Directory PowerShell for Graph. To do that, open Windows PowerShell as an Administrator 

Open Windows PowerShell as an Administrator

Review installed modules using the command:

Get-InstalledModule -Name "AzureAD*"

If you have not installed the Azure PowerShell then you will get this message:

If you have not installed the Azure PowerShell then you will get this message


If you have an older version of AzureAD PowerShell it is better to uninstall it and then install the new version.

To uninstall AzureAD run the command:

Uninstall-Module AzureADPreview


Uninstall-Module AzureAD

To install the Azure PowerShell run the command

Install-Module AzureADPreview

Install the Azure PowerShell

Input Y to confirm install from an untrusted source.

Wait for the module to install

Wait for the module to install

Step #2 Restore a deleted  Office 365 Group

Open the Windows PowerShell you’ve just installed with Administrator privileges

Open the Windows PowerShell you’ve just installed with Administrator privileges

Run the command:

Import-Module AzureADPreview

Run the command: Import-Module AzureADPreview

Then connect to your Office 365 tenant


You will be asked to enter your Office 365 administrator account details

Enter your Office 365 administrator account details

You will then receive a message with the connection details

You will then receive a message with the connection details

To get a list of deleted groups run the command

Run the command Get-AzureADMSDeletedGroup

Enter the group ID you wish to restore:

Restore-AzureADMSDeletedDirectoryObject -Id <objectId>

Enter the group ID you wish to restore:

And voila! The group will be accessible in the Office 365 admin center and on SharePoint

Restored Office 365 group

For further information, see the Microsoft help center. Note, that restoring the group will restore all related objects:

  • Azure Active Directory (AD) Office 365 groups object properties and members
  • Group e-mail
  • Common Exchange Inbox
  • SharePoint Online team site and files
  • OneNote notebook
  • Planner
  • Teams
  • Yammer group and group content (If the Office 365 group was created from Yammer)

New call-to-action


Only Office 365 groups can be restored; security groups are permanently deleted and cannot be restored. A quick tip: even with planned group deletions, use the Remove-AzureADMSGroup command to soft delete Office 365 groups. However, even a soft-deleted group is stored only for 30 days, after this period the group is deleted permanently. 

A deleted group can cause considerable disturbance to your business processes and workflows. The same holds true for deleted emails, OneDrive files, SharePoint sites, etc. Apart from accidental or malicious deletion, you can also suffer Office 365 data loss due to malware attacks that are getting more ingenious and malicious by the day.

As the IT Admin, the onus for protecting the data rests with you. Mitigate the risk of a data breach with a dependable Office 365 backup and recovery solution – the most efficient way to recover data quickly and seamlessly.

How CloudAlly can help

CloudAlly’s Office 365 Groups backup and recovery solution, comprehensively backs up Office 365 Mail, Calendar, Contacts, and Tasks. Blunt the risk of data loss and facilitate easy self-service recovery with CloudAlly’s top-rated SaaS backup that was named by Newsweek as one of the Best Business Tools of 2019.

Try our full-featured trial now and ensure that your organization is protected from Office 365 data loss. 

5 Pointers for Comprehensive Office 365 Backup and Recovery

By Michael Schneider – Marketing Director

Office 365 Backup and Recovery

The average cost of a data breach is $3.92 million – and that is not counting the irreparable damage to the business, reputation, and customer trust. Add to that the fact that one in three organizations have experienced SaaS data loss and the prevalence of malware attacks and you have the perfect cyber-security crisis. How do you protect your organization from Office 365 data loss or corruption? Hence: Office 365 Backup and Recovery, is essential for business.

As the IT administrator, do you have a strategy to recover from a data breach? Can you recover an important document from last year? A crucial email from 100 days ago?  Office 365 backup and recovery is essential for quick disaster recuperation and seamless business continuity. 

Five pointers for comprehensive Office 365 data protection.

#1 Understand that Office 365 data needs protection

Microsoft product; Office 365 provides a secure, and highly-available service for enterprise productivity. However, it cannot protect you from data loss in your own company, due to human error, malicious intent, sync errors, and/or malware attacks. Additionally, compliance laws like the GDPR mandate that you share the onus of protecting your customer’s data. Office 365 data needs protection too, just as you would with an on-premise solution; it isn’t exempt because it is on the cloud.

#2 SaaS Backup and Recovery is your data’s safety net

Native Office 365 data restore capabilities are built for archival and not recovery. Moreover, they are non-existent after a few months. With Office 365 managing business-critical data, it is essential to have a long-term legal hold data recovery strategy. As the IT administrator, do you have a strategy to recover from a data breach? Can you recover an important document from last year? A crucial email from 100 days ago?

A reliable backup solution is your best defense against SaaS data loss. Moreover, if the backup is cloud-based it can harness the same advantages of cloud computing that your SaaS platform has – scalability, accessibility, and computational prowess. Automated SaaS backup stores an accurate copy of your data that can be quickly and easily restored in the event of data loss. As this accelerates disaster recovery and ensures business continuity, your organization can get back to business even after a data breach. Thus blunting its impact and mitigating the possible damage.

New call-to-action

#3 Check that SaaS Backup includes Exchange Online

Office 365 offers no native restore options beyond 93 days. Exchange Online mailboxes should be protected by policy-driven backup plans to help ensure that data is protected and that it expires when retention has been met. Make sure that your backup solution includes all critical mailbox data. Mailbox backups should include all the types of data contained within the mailbox, such as messages, contacts, calendar items, chat histories, etc.

#4 Choose SharePoint backup and recovery with granular controls

Many organizations rely heavily on SharePoint for a variety of business use cases such as the company intranet, project tracking, team collaboration, and content management. This data is too valuable to skip backing up.

Check that your Office 365 SharePoint data protection includes flexibility for backup and recovery for an entire site all the way down to the object level. Furthermore, SharePoint recovery should ensure permissions are applied to objects to control end-user access. It should also have the ability to restore permissions without overwriting any of the objects.

#5 Don’t exclude OneDrive for Business backup and recovery

OneDrive for Business is a file hosting and synchronization service for files, large and small.  OneDrive is often the main storage and collaboration platform for modern enterprises and hosts many business-critical documents. Don’t neglect OneDrive backups! OneDrive data needs to be protected from a holistic, administrative point of view so that it’s easy to provide recovery when an end-user ultimately needs data restored.

How CloudAlly can help?

CloudAlly’s SaaS backup and recovery solutions enable you to recover mail, calendar, contacts, SharePoint sites, and OneDrive documents. You can empower both legal requestors and end-users with just one self-service single search across their Office 365 data, and own storage with cloud-based backups.

For organizations that need to comply with regulatory requirements like GDPR, CloudAlly provides highly secure backup on Amazon AWS in the regional storage locations of your choice.

Try our full-featured trial now and give your Office 365 data comprehensive and secure protection.  

Office 365 Backup and Recovery, is essential for your business, 

Back it up today.

How Can You Recover a Deleted SharePoint Site?

Recover a deleted SharePoint site

Your team has created an elegant SharePoint Team Site for your intranet – it is the mainstay of your company. And then someone mistakenly hits delete or the site gets corrupted. Or worse still, an entire Site Collection gets erroneously deleted by another admin. As the Office 365 or Sharepoint administrator, it would be up to you to recover them. We thought we’d help out with a step-wise list of instructions to: recover a deleted Sharepoint site, along with best practices for Office 365 data recovery. 

This article includes:

Steps to recover a deleted SharePoint site

Note, that we’re assuming that you as the Office 365 or SharePoint administrator have the required permissions. If not, check with your technical support.

Consider you have a SharePoint site for the ‘CRM Development’ project team and it is located at

Recover a deleted SharePoint site

Oops! The site has been accidentally deleted, and you will receive a 404 error when you try to access the site. 

404 error on access

Perform the following steps to restore the deleted site.

Step 1: Go to Site Settings

  1. Go to the root site collection of the deleted site. The link in our example is  (without subsite link ‘crm’). 
  2. Log in as a user with the site collection admin permissions
  3. In the top navigation panel click Settings and then select Site settings on the dropdown menu

Go to Sharepoint's Site Settings

Step 2: Go to the Second-Stage Recycle Bin

Click Recycle bin under Site Collection Administration section

Go to Sharepoint's Second-Stage Recycle Bin

The recycle bin might be empty. Click Second-stage recycle bin at the bottom of the page

Second-stage recycle bin

Step 3: Restore your deleted site

Select the site you want to restore and then click Restore

Select the site you want to restore

The restored site will disappear from the list after the restoring process is completed

Restored Sharepoint site removed from the Bin

To verify that the site has been successfully restored, go to the site’s source link

Sharepoint Site successfully restored

For additional information, read more from the Microsoft help center

New call-to-action

Limitations to Restoring Sites from SharePoint Recycle Bin

Here’s the caveat, and it’s an important one. Deleted sites are stored only for a maximum of 90 days. After the 90 day period, the deleted sites are automatically and permanently deleted.

Moreover, the Site Collection Recycle Bin has a quota on the amount of data that can be stored in the bin. If the quota is exceeded, then the oldest items, including deleted sites, will be automatically and permanently deleted.

SharePoint Recovery Best Practices

Native options such as restoring sites from SharePoint Recycle Bin have time-based and size-based limitations. As the administrator, when faced with the stress of a deleted site or site collection, what if you found that it could not be retrieved because the Recycle Bin got purged or three months have elapsed. Understand that such built-in solutions are meant as a bandaid measure and not as a robust recovery solution. 

Additionally, SaaS solutions cannot protect your from data loss at your end, due to human error or malicious intent, malware attacks, or sync errors. With one in three organizations having experienced SaaS data loss, you need a dependable backup and recovery solution to quickly get your lost data back – accurately and from any point-in-time.

CloudAlly’s SharePoint backup solution, comprehensively backs up SharePoint Online Team Site (and all sub-sites), Public Site (and all sub-sites), private Site Collections and OneDrive for Business Sites. What’s more, it stores the backup indefinitely and in Amazon’s highly reliable data centers. CloudAlly makes recovery a breeze with provisions for non-destructive restores both at the granular item-level or of the complete site.  Learn More.

Contact us to see how CloudAlly can smoothen your SharePoint recovery.