PowerShellTeams

How to Restore a Deleted Team in Microsoft Teams

To restore a deleted team in Microsoft Teams requires you to perform some additional steps. To delete or achieve a team is easy however to restore a deleted team, you can either use PowerShell commands or Azure portal.

In my previous post, I showed how to archive or delete a team in Microsoft teams. This post as a continuation of my previous post and I will cover the steps to recover deleted team.

Note – When a team is created in Microsoft Teams, it creates an Office 365 group. If you’ve deleted a group, it will be retained for 30 days by default. This 30-day period is considered a “soft-delete” because you can still restore the group. After 30 days, the group and its associated contents are permanently deleted and cannot be restored.

Restore a Deleted Team in Microsoft Teams Using PowerShell

Here are the steps to restore a deleted team in Microsoft Teams using PowerShell.

Launch the PowerShell as admin and install the AzureADPreview module. It is important that you install the latest version of AzureADPreview.

You can uninstall the earlier version of the AzureADPreview module installed by running the below command

Uninstall-Module AzureADPreview

Install the AzureADPreview module using the below command

Install-Module AzureADPreview

Install-Module AzureADPreview

In the next step, connect to Azure AD by running the below command.

Connect-AzureAD

Azure account signin

In the next step run the command to display a list of all soft-deleted Office 365 groups that are still within the 30-day retention period.

Get-AzureADMSDeletedGroup

Make a note of the ID because we will restore the deleted team using the same ID and not the display name.
Get-AzureADMSDeletedGroupRestore the deleted team using the below command. Remember to replace ID with the one that you copied in the above step.

Restore-AzureADMSDeletedDirectoryObject -Id [Id]

Restore a Deleted Team in Microsoft Teams

It can take up to 24 hours for the restore process to complete. However I did see the deleted team appear within few minutes in Microsoft Teams.

Microsoft Teams

Restore a Deleted Team via Azure Portal

You can restore a deleted team using Azure Portal.

  • First of all login to Azure Portal.
  • Search for Groups and once you select Groups, click Deleted Groups.
  • You should find the deleted team in the list. Select the team and click Restore Group.

Restore a Deleted Team in Microsoft Teams

Click Yes when asked for “Do you want to restore deleted groups”.

Restore a Deleted Team in Microsoft Teams

Prajwal Desai

Hi, I am Prajwal Desai. For last few years I have been working on multiple technologies such as SCCM / Configuration Manager, Intune, Azure, Security etc. I created this site so that I can share valuable information with everyone.

Related Articles

7 Comments

      1. Had the same issue, had a group deleted 2 days ago and it displays in the “deleted groups” field. However when we select it to restore or permanently delete the buttons remained “grey’d out”. Hope this helps

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button