If one of your Office365 groups with important data and documents was deleted, what should you do?
It doesn’t matter, in the end of March this year, Microsoft released Azure Active Directory PowerShell module to solve this problem . This module includes the cmdlets needed to restore a deleted group.
The only way to restore the Office365 group is to use PowerShell cmdlets, and your account needs administrator permissions.
Deleted groups will be retained for 30 days by default. During this period, you can restore groups. After a period of time, Office 365 will permanently delete all group resources. Then the group can‘t be restored.
Remove-MsolGroup command in PowerShell will permanently delete a group. Remove-AzureADMSGroup command will soft-delete a group. Only the soft-deleted groups could be restored. Note: Deleting groups in the portal is soft-deleting, the deleted groups can be restored through PowerShell.
Refer to Restore a deleted Office 365 Group for detailed steps.
When running this command to install latest version of AzureADPreview:
Your powershell may not recognize Install-Module, please install git first, and then run this command:
PowerShellGet\Install-Module posh-git –Scope CurrentUser
Following the document mentioned above, we are able to restore the deleted Office365 groups.
How to restore Office 365 groups for 21v users?
The above method is currently only applicable to the users who use international Office365, for 21v users how to restore Office365 groups?
We need to know firstly, Office365 group is based on the sharepoint site, so 21v users can restore the group site to restore the Office365 groups. Here is steps to restore the group site.
- To restore the site you need to install the SharePoint Online Management shell firstly.
- The global administrator then connects to SharePoint Online Management Center using connect-sposervice -url <URL> -credential <UPN>. E.g:
Connect-SPOService -Url https://jmaster-admin.sharepoint.com/ -credential email@example.com
- Query with the command to find the site that was deleted:
- Run this command to get all the properties of the deleted site in the Recycle Bin:
Get-SPODeletedSite -Identity <URL>
- Finally, use the following command to restore the site:
Restore-SPODeletedSite -Identity https://contoso.sharepoint.com/sites/arecycledsite
- After the restoration, run this command to see this site:
With the recovery of SharePoint site, the Office365 groups will be restored as well.