When working within Microsoft Teams, owners of teams have the capability of deleting a team, and sometimes these teams may be accidently deleted. When the team is deleted, it is held in the "recycle bin" for 30 days until it is permanently deleted. This blog post will walk an IT administrator through the process of restoring a deleted team in Microsoft Teams.
Step 1: Create a Team in Microsoft Teams
Create a new team in Microsoft Teams titled Project Del Mar:
Create additional tabs w/ content (including OneNote and Planner tasks), as an example:
Create sample files and folder content under the Files tab:
Create sample chat content under the Conversations tab:
Step 2: Delete the Team in Microsoft Teams
From within Microsoft Teams, right click the name of the team and select Delete Team. In the dialog box, select I understand that everything will be deleted and then click the button Delete Team.
Notice the team is now deleted and no longer appears in the list of teams you subscribe to:
Step 3: Restore the Deleted Team:
Launch PowerShell as an administrator. Note, at the time of this writing, this restore procedure requires the AzureADPreview module to be installed. To install, simply type Install-Module AzureADPreview and follow the prompts.
IMPORTANT: When a team is created in Microsoft Teams, it creates an Office 365 group. This procedure is the process for restoring an Office 365 group and is documented in more detail here.
Connect to Azure AD by typing the following command:
When prompted, sign in:
Once you are signed in, you will see the following:
Display all deleted Office 365 groups by typing the following command:
Note: Use -All $True if you have a lengthy list of groups.
Find the group you wish to restore, and copy the id from the Id column to the clipboard. Next, to restore the deleted group type the following where [ID] is the Id of the group and press Enter:
|Restore-AzureADMSDeletedDirectoryObject -Id [ID]|
Verify group was restored successfully by typing the following command, where [ID] is the ID of the group you restored:
|Get-AzureADGroup -ObjectId [ID]|
Important: The process of restoring an Office 365 group and thus restoring the team in Microsoft Teams can take up to 24 hours.
After waiting up to 24 hours, return to Microsoft Teams. Note, the team will be displayed in the list of teams you subscribe to, and all existing content within the tabs, including conversations will be restored successfully. This also includes channels as well.