network technician/administrator/manager blog
Restore the Deleted Team:
Restore the Deleted Team:

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:

Connect-AzureAD

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:

Get-AzureADMSDeletedGroup 

Note: Use -All $True if you have a lengthy list of groups.

Example:

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]

Example:

Verify group was restored successfully by typing the following command, where [ID] is the ID of the group you restored:

Get-AzureADGroup -ObjectId [ID]

Example:

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.