Table of Contents
By Eddie Pinchasov – Product Director
How to Restore a Deleted Office 365 Groups using PowerShell ?
Microsoft 365 (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?
Step-by-step pointers below:
- Step #1 Install the latest PowerShell version
- Step #2 Restore the deleted Office 365 group
- Limitations
- How CloudAlly can help?
Consider that you have a SharePoint group MarketingO365
This group is used to grant permissions to members of Marketing O365 Members to a team site with important marketing data
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
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 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
Or
Uninstall-Module AzureAD
To install the Azure PowerShell run the command
Install-Module AzureADPreview
Input Y to confirm install from an untrusted source.
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
Run the command:
Import-Module AzureADPreview
Then connect to your Office 365 tenant
Connect-AzureAD
You will be asked to enter your Office 365 administrator account details
You will then receive a message with the connection details
To get a list of deleted groups run the command
Get-AzureADMSDeletedGroup
Enter the group ID you wish to restore:
Restore-AzureADMSDeletedDirectoryObject -Id
And voila! The group will be accessible in the Office 365 admin center and on SharePoint
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)
Limitations
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.