« Previous 1 2 3 Next »
Archiving teams and channels
Stockpiled
Archiving Directly in the Teams Client
Archiving is also available in the group properties of the Teams client – if the user is authorized to do this; some Microsoft 365 subscriptions do not include this option. If the menu item for archiving does not appear in the team's context menu, click the settings gearwheel at the bottom of the Teams client. You can now see all the teams that you can manage as an owner or admin. The menu with three dots for each team normally has an Archive team option (Figure 2). Again, you need to set the SharePoint site to read-only.
Provided you have the right subscription and matching authorizations, archived teams can also be reactivated in the Teams client. The two options for this are also available in the menu with three dots. The archived groups in the Teams client are listed in Archived . To reactivate, just select Restore team . After restoring the team, the members can continue to edit the documents.
Archived teams can be searched and the documents read. However, changes are ruled out. Teams locks down all team activities after archiving. Users are no longer allowed to start new conversations or reply to posts on a channel, add or remove channels, edit settings, or add apps. However, as a team owner, you can still add or remove members, update roles, and delete, renew, or restore an archived team.
Restoring Teams and Channels
Team owners and admins can delete teams. In this case, the team's data will remain available in the Microsoft 365 recycle bin for 30 days. However, as I mentioned earlier, this is not long-term archiving. You can use the menu in the Teams client to delete or press the Delete button after selecting the team under Teams | Manage teams in the admin center menu.
Deleting wipes out the group mailbox, calendar, and all the files stored on SharePoint Online. All data in OneNote, Planner, Power BI, or Stream are lost during this process.
Individual channels can also be deleted if a user has the right authorization. However, team owners can recover deleted channels with relative ease by clicking Manage team in the team's context menu and then clicking on the Channels tab. You will then see the deleted channels under Deleted . At this point, you can also see when the channel was deleted, and you can reactivate the channel with the Restore menu item in the recycle bin. During this process, Teams restores the files that were stored in the channel. Strictly speaking, the files were never deleted, but only hidden in Teams.
When you delete a channel, SharePoint keeps the channel's files as folders in the team's document library. The users are just no longer able to access the documents. To ensure that these files are no longer present, you need to delete the folder in SharePoint itself, but if you then try to restore the channel, the documents are lost because the process in Teams can no longer access the SharePoint source.
When restoring a channel, Teams discovers that the folder for the channel is missing from the Teams document library and creates a new one. Nothing is recovered from the SharePoint recycle bin. However, you can manually restore the deleted channel folder from the recycle bin in SharePoint. Before you do so, you need to delete the folder that was automatically created before you restore it with the data from the SharePoint recycle bin.
Administration with PowerShell
When deleting teams, Microsoft 365 moves the data to the recycle bin to enable their recovery with the Teams and groups | Deleted groups item in the Microsoft 365 admin center. Teams are constructs that build on Microsoft 365 groups. When you delete a team, you delete the associated Microsoft 365 group.
This arrangement explains why recovery takes place in the Microsoft 365 admin center, not in the Teams admin center. You will find the deleted groups and the connected teams there. Restore group starts the process.
PowerShell is also a path for recovery. The process relies on the AzureADPreview
module. To ensure that you are using the latest version, first uninstall the two associated modules then install the latest version:
Uninstall-Module AzureADPreview Uninstall-Module AzureAD Install-Module AzureADPreview
When done, connect to Azure AD and query the deleted teams and groups from Microsoft 365:
Connect-AzureAD Get-AzureADMSDeletedGroup
The Get-AzureADGroup
cmdlet lets you view all the groups and Teams in PowerShell. The recovery is based on the team ID, which you can see in PowerShell; for example,
Restore-AzureADMSDeletedDirectoryObject -id 9c5d6112-f57d-4b7e-8ecc-548e9f79cf7d
Note that it may take several hours for a recovered team to work correctly and for all data to be restored.
You can also use PowerShell to archive teams. To do this, you need the PowerShell module for Teams, which you can install with the
Install-Module -Name MicrosoftTeams -Force -AllowClobber
command. Next, log in by typing
Connect-MicrosoftTeams
In the active PowerShell session, import the module and display all the teams first (Figure 3):
Import-Module MicrosoftTeams Get-Team
You can see the team IDs here. You need the ID to archive a team:
Set-TeamArchivedState -GroupId 5a8edffb-43ec-4dbc-bf12-4b50d2c65240 -Archived:$true
You can check the value of Archived
again if you query it with Get-Team
. To make sure that the associated SharePoint page is read-only, type
Set-TeamArchivedState -GroupId 5a8edffb-43ec-4dbc-bf12-4b50d2c65240 -Archived:$true -SetSpoSiteReadOnlyForMembers:$true
To stop archiving again, use
Set-TeamArchivedState -GroupId 5a8edffb-43ec-4dbc-bf12-4b50d2c65240 -Archived:$false
to set the value of -Archived:
to $false
.
« Previous 1 2 3 Next »
Buy this article as PDF
(incl. VAT)
Buy ADMIN Magazine
Subscribe to our ADMIN Newsletters
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Most Popular
Support Our Work
ADMIN content is made possible with support from readers like you. Please consider contributing when you've found an article to be beneficial.