Restore Deleted Office 365 Groups

0
96
views

How to restore deleted Office 365 Groups

 

By default deleted Microsoft Office 365 groups are retained for 30 days. The groups which was deleted within 30 days are known as “soft-delete“, and can be restored using powershell.

Powershell can also be used to permanently delete these groups if an admin does not want to wait for the “soft-delete” retention period to expire.

 

IMPORTANT: If you use Remove-MsolGroup in PowerShell to delete a group, this will delete the group permanently. When using PowerShell to delete groups, it’s best practice to use Remove-AzureADMSGroup to soft-delete the O365 group. That way you can get it back if needed.

 

IMPORTANT: The procedures in this article require the PREVIEW version Azure Active Directory Module for Windows PowerShell, specifically, the AzureADPreview module, version 2.0.0.137 or later.

As a best practice, Microsoft recommends to always staying current: uninstall the old AzureADPreview version and get the latest one before you run PowerShell commands

 

To get started we need to download the latest version of AzureADPreview, this can be done using a normal powershell session.

 

To save the installer file run the below cmdlet.

Next lets continue with installing the latest AzureADPreview PowerShell Module.

If you have a previous version of the AzureADPreview installed use the below steps to uninstall and install the latest version.

 

  1. To uninstall a previous version of AzureADPreview, run this command:

  1. To install the latest version of AzureADPreview, run this command:

  1. At the message about an untrusted repository, type Y. It will take a minute or so for the new module to install.

 

Now that we have the latest version of the AzureAD Powershell installed , lets continue with restoring a deleted Office 365 Group.

To restore a deleted group you must have Office 365 global admin or organization management permissions.

 

Lets create a connection to AzureAd powershell running the following cmdlet.

Provide the login details of account with Global admin or Organization management permissions.

 

Run this command to display all soft-deleted Office 365 groups in your organization that are still within the 30 day retention period:

Here we can see the deleted group being displayed.

Note the ID of the groups as this will be used to restore the deleted group.

 

This process usually takes just a few minutes but in a few rare cases Microsoft has advised that it can take as long as 24 hours to completely restore.

 

Lets verify that the group has been successfully restored by running the following cmdlet:

The deleted group has been restored and is available in AzureAD again.

Once the restore has been completed, the group will reappear for the user in Outlook navigation pane and will contain the content of the group as well.

 

Group content that can be restored includes:

  • Azure Active Directory (AD) Office 365 Groups object, properties and members
  • Group SMTP address
  • Exchange Online shared inbox and calendar
  • SharePoint Online team site and files
  • OneNote notebook
  • Planner

Additionally if you have a connected Microsoft Team or Office 365 Connected Yammer group, those can be restored as well.

 

How to delete a group permanently

Sometimes you may want to permanently purge a group without waiting the 30 days for the soft-delete to expire. To do that start PowerShell and run this command to get the object ID of the group.

 

Take note of the object ID of the group, or groups, you want to permanently delete.

CAUTION: Purging the group removes the group and its data forever.

 

To purge the group run this command in PowerShell

To confirm that the group has been successfully purged, run the Get-AzureADMSDeletedGroup cmdlet again to confirm that the group no longer appears on the list of soft-deleted groups.

 

#ThatLazyAdmin

 

 

 

 

 

Sharing is caring!

Previous articleWhat is Azure Stack?
Next articleSend Later Office 365 Outlook for Mac
About Me ? I Guess i would start by saying i am a family guys and full time SysAdmin and Tech Junky. This Blog is my first attempt to share information about daily issues i come across as a SysAdmin as well as some new deployments i am part of. Topics that i will cover will mostly be about Office 365,Windows,Exchange as well as Active Directory. I hope some of my Blog posts helps someone #LiveLongAndBeLazy #Exchange #Office 365 #ActiveDirectory #Hyper-V
SHARE

LEAVE A REPLY

Please enter your comment!
Please enter your name here