Each project in an organization follows a lifecycle, including start, execution, and completion. However, even after a project ends, the corresponding team often remains in the execution phase, leading to a growing number of inactive teams in Microsoft Teams.
Without proper Microsoft Teams lifecycle management, these unused teams can clutter the MS Teams workspace and make it difficult to manage. Therefore, it is essential to delete or archive inactive teams in Microsoft Teams when a project concludes to maintain security and compliance.
Delete or Archive Inactive Team? Make the Right Choice!
Managing inactive teams in Microsoft Teams comes down to two options: delete or archive. Deleting a team permanently removes all its data, including chats, files, and sites, with no direct way to restore it. In contrast, an archived team remains accessible and can be unarchived at any time.
You should delete an inactive MS team if it is no longer needed in the future and archive a Microsoft team if it is inactive but may be required later for reference or potential reactivation.
Recommended Action: To prevent data loss, it is best to archive a team first and postpone deletion until you are certain it is no longer needed.
What Happens When an Inactive Team is Archived in Microsoft Teams?
Archiving a team removes it from the Active Teams list and freezes all team activity, ensuring no new content can be added. However, all existing conversations, files, and team channels remain intact and can still be accessed in a read-only mode which allows users to search and reference past discussions and documents.
While no one can modify or post content in archived inactive teams, team owners can still manage memberships and update roles as needed.
How Archiving Affects Microsoft Teams Channels and Shared Content?
- Standard and Private Channels: These remain visible, and their content stays accessible. However, all activity within them is frozen.
- Shared Channels: Individual sharing remains intact, but access granted to other teams (beyond the parent team) is revoked. If the team is unarchived, shared channels will be restored with individual sharing only.
- Files and Chats: All team files and chats are still available, but no new messages or file edits can take place.
- SharePoint Site: The SharePoint Online site linked to the team and its channels stays accessible. However, it can be set to read-only for team members to prevent modifications.
In this blog, let’s explore how to archive inactive teams in Microsoft Teams and maintain better workspace management.
How to Archive a Team in Microsoft Teams
There are many ways to archive teams in Microsoft 365. Here are some approaches to archive a team in your organization.
1. Archive Inactive Team in Teams Admin Center
Follow the steps below to archive an inactive Microsoft team using the Microsoft Teams admin center.
- Log in to the Microsoft Teams admin center and go to Teams → Manage teams.
- Select the inactive team you want to archive and click Archive on the toolbar.
- Check “Make the SharePoint site read-only for team members” to prevent them from editing content in the associated SharePoint site, then click Archive.
While this is the standard way to archive a team, try selecting two teams at the same time. Notice that the Archive option is greyed out? That’s because archiving must be done one team at a time. Unfortunately, there is no bulk archive option available in the Teams admin center.
2. Archive Teams Using Microsoft Graph PowerShell
Connect to Microsoft Graph PowerShell and run the following cmdlet to archive a specific inactive team in Microsoft 365.
1 |
Invoke-MgArchiveTeam -TeamId <TeamId> |
Replace <TeamId> with the Group ID of the inactive Microsoft team. You can retrieve the team ID using the Get-MgGroup cmdlet. To save time and effort when archiving multiple teams, you can also archive teams in bulk using PowerShell.
Archiving a few teams manually might seem manageable, but what if you need to archive all the inactive teams that are unused for a specific number of days?
Manually identifying last activity date and archiving teams quickly becomes a tedious and time-consuming task. Wouldn’t it be better to have a solution that simplifies everything?
That’s why we’ve developed a PowerShell script that automates the process! With just one click, you can track and archive all inactive teams based on a specific inactivity period. No more repetitive tasks—just effortless bulk archiving!
Download Script: ArchiveInactiveTeams.ps1
Script Highlights:
- Export all inactive teams along with their last activity date and inactive days.
- Automatically archives inactive teams based on their inactivity period.
- List all teams that have had no activity since creation.
- Find teams that have been inactive for a specific period.
- Automatically install the Microsoft Graph PowerShell module (if not installed already) upon your confirmation.
- The script can be executed with an MFA-enabled account too.
- Supports Certificate-based Authentication too.
- The script is scheduler friendly.
Archive Inactive Teams in Microsoft Teams – Sample Outputs
Inactive Teams in Microsoft Teams Report
Upon execution, the PowerShell script generates a report detailing all teams and their last activity date as follows.
The script exports all inactive MS teams along with details such as Team Name, Team Type, Last Activity Date, Inactive Days, and Archive Status Log.
With the Microsoft Teams inactivity report, you can quickly identify teams that have not been active for an extended period and archive them using -InactiveDays and -ArchiveInactiveTeams parameters.
Archive Inactive Teams in Microsoft 365 Report
While executing the script with -ArchiveInactiveTeams parameter, the PowerShell script archives teams that have been inactive for a specified period. After archiving, it generates a report listing all archived teams, as shown below.
Archive Unused Microsoft Teams – Script Execution Steps
Follow the below steps to archive all teams which are no longer in use in your organization.
- Download the script.
- Start the Windows PowerShell.
- Select any of the methods below to execute the script.
Method 1: Execute the script with MFA or non-MFA account.
1 |
.\ArchiveInactiveTeams.ps1 -InactiveDays 90 -ArchiveInactiveTeams |
This format archives all teams with no activity for the past 90 days You can adjust the duration by replacing 90 with your preferred number of days.
Method 2: Execute the script using certificate-based authentication.
To enable certificate-based authentication, you need to register the app in Entra ID which helps you connect Microsoft Graph PowerShell. Depending on your requirements, you can create a self-signed certificate or use a certificate authority (CA).
1 |
.\ArchiveInactiveTeams.ps1 -TenantId <TenantId> -ClientId <ClientId> -CertificateThumbprint <CertificateThumbprint> -InactiveDays <Days> -ArchiveInactiveTeams |
Harness the Full Potential of Archive Inactive Teams Script!
The PowerShell script comes with predefined filters to meet your specific needs. Let’s dive into how these filters can solve your challenges.
1. Find and Archive Never Used Microsoft Teams
Many admins confuse never-used teams with inactive teams. Inactive teams once had activity but have been idle for a while, whereas never-used teams have had no activity since creation. Since these teams contain no data or conversations, you can quickly identify and delete them to keep your Microsoft Teams environment organized.
By default, our PowerShell script only displays teams with activity, making it easier to identify teams that should be archived before deletion. To identify and auto-archive teams with no activity, use the -IncludeTeamsWithNoActivity parameter.
1 |
.\AutoArchiveInactiveTeams.ps1 -IncludeTeamsWithNoActivity -ArchiveInactiveTeams |
You can also run the script without -ArchiveInactiveTeams parameter to export teams that have never been used since their creation, along with inactive Microsoft Teams in your organization.
Tip: Prevent unnecessary team creation by restricting users from creating teams in Microsoft Teams.
2. Automate Inactive Teams Archiving in MS Teams
Inactive teams should be archived periodically to prevent a large number of unused teams from accumulating in your organization. However, running the script manually at regular intervals isn’t always practical, and it’s easy to forget.
That’s why we designed this script to be scheduler friendly. Using Microsoft Entra certificate-based authentication, you can schedule the PowerShell script with Task Scheduler. Alternatively, you can also schedule the script using Azure Automation to periodically identify and archive inactive teams.
1 |
<Script Location>\ArchiveInactiveTeams.ps1 -TenantId <TenantId> -ClientId <ClientId> -CertificateThumbprint <CertificateThumbprint> -ArchiveInactiveTeams -InactiveDays 90 |
You can replace 90 with the required days. This format archives all teams that were inactive over the defined period and exports the archived teams in a CSV file.
Having trouble managing inactive teams in Microsoft Teams? Not anymore! AdminDroid’s Microsoft Teams management tool simplifies the process for you with its powerful insights. You can easily monitor team activity, identify inactive teams, and streamline archiving—ensuring a well-organized and clutter-free Microsoft Teams environment.
Make Microsoft Teams management smarter and more efficient. Try AdminDroid today and take full control of your MS Teams landscape!
We hope this blog helps you archive inactive Microsoft teams and groups. If you have any queries or requirements, feel free to reach out in the comments—we’re here to assist you!