Updated 3 days ago

How to Find Inactive Teams in MS Teams

by Karthi

5 min read

No Comments

Since 2020, Microsoft Teams has taken the lead as the go-to communication tool in organizations. From chats to meetings, it’s become the collaboration hub for team projects. However, as projects come to an end, many of the teams gradually fade into inactivity. Before you know it, inactive Microsoft teams start piling up in your organization, cluttering your workspace with completed projects and outdated teams.

It’s easy to overlook a few, but as they accumulate, managing team settings and keeping your Microsoft Teams environment tidy becomes challenging. Therefore, let’s explore how to find and manage inactive teams in Microsoft 365 for a secure and organized Microsoft Teams environment.

How to list Inactive Teams in Microsoft 365

You can use the following approaches to find all unused Microsoft teams in your organization.

  1. Find inactive teams through the Teams usage report
  2. Find inactive teams using PowerShell

1. Find Inactive Teams Through the Teams Usage Report

Microsoft 365 does not provide a direct way to list all inactive Microsoft teams. However, you can still identify teams that are no longer in use by reviewing their last activity date in the Microsoft Teams usage report. This approach allows you to determine which teams have remained unused in your organization.

To find and analyze inactive teams, follow the steps below to generate the Teams usage report.

  1. Sign in to the Microsoft Teams admin center.
  2. Navigate to Analytics & reports → Usage reports.
  3. Go to the View reports tab, click the Report drop-down, and select Teams usage.
  4. Select the required Date range from the drop-down. (last 7, 30, 90, or 180 days)
  5. Click the Run report button to generate the teams usage report.

unused-teams-in-microsoft-365

2. Find Inactive Teams Using PowerShell

You can use the Get-MgReportTeamActivityDetail cmdlet to generate a detailed Teams usage report, which includes the last activity date of each team. By analyzing this data, you can identify teams that have been inactive over a specific period.

This cmdlet retrieves the last activity date of all teams in Microsoft Teams.

Although these methods seem feasible for identifying inactive teams, it can be a tedious and time-consuming task for larger organizations. That’s why we have developed a PowerShell script that lists all teams along with their inactive days, making the process more efficient and manageable.

Download Script: FindInactiveTeams.ps1

Script Highlights:

  • Export all teams and their last activity date, Inactive days.
  • Helps to find out inactive teams based on inactive days.
  • 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.

Teams with No Activity Report – Sample Output

Upon execution, the PowerShell script will generate the Microsoft teams inactivity report as follows:

inactive-teams-in-microsoft-365

This script exports all teams in your organization along with details like the Team Type, Last Activity Date, Inactive Days, Is Deleted, and Team ID.

Find Unused Microsoft teams – Script Execution Steps

Follow the steps below to identify all inactive teams in your organization.

  1. Download the script.
  2. Start the Windows PowerShell.
  3. Select any of the methods below to execute the script.

Method 1: Execute the script with MFA or non-MFA account

This format exports the inactive duration for each MS team. With this detail, you can easily find the teams that have been inactive for a longer period.

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).

You can also schedule the PowerShell script using Task Scheduler or Azure Automation to periodically detect and export inactive teams report.

Utilize the full potential of the “Find Inactive Teams” script!

The script includes some predefined filters designed to meet your specific needs. Here are the use cases you can implement using the script.

1. Find Unused Teams Over a Specific Period

By default, the script lists all the teams and their last activity date, providing an overview of team activity. However, pinpointing teams that are never used for a specific period, such as over 180 days, can be challenging in larger organizations.

To streamline this process and refine your search, you can use the -InactiveDays parameter. This makes it easier to quickly locate teams that have remained inactive for extended periods.

This format exports all Microsoft teams that have been inactive for more than 180 days. Once identified, you can choose to archive teams that may be required in the future or delete MS teams that are no longer needed.

2. Get Idle Teams While Skipping Never-Used Ones

Inactive teams and never-used teams might seem similar, but it’s essential to distinguish between the two to avoid data loss. While never-used teams have remained completely inactive since their creation, inactive teams were once active, holding valuable content like conversations, files, and SharePoint data.

Deleting teams could lead to the unintentional removal of important data, including OneDrive files and associated Microsoft 365 groups. To prevent this, it’s crucial to track and manage them separately.

In this section, let’s explore how to export inactive teams that were once active using the -ExcludeNeverUsedTeams parameter.

You can also use the -InactiveDays parameter along with the above format to track teams that were once active but have remained inactive for a specific period.

3. Track Never Used Teams

On the other hand, never-used teams are those that have had no activity since their creation. They don’t contain any valuable data such as files, shared content, or conversations. However, identifying these teams is just as important, as they remain in your organization and create unnecessary clutter to your MS Teams reports.

To filter out the teams that have never been active, you can use the -ShowNeverUsedTeams parameter.

Never-used Microsoft teams are often the result of unnecessary team creation. To prevent this, follow Microsoft Teams best practices by restricting users from creating new teams in your organization.

Tips:

We hope this blog has helped you identify all inactive teams in your organization. If you have any further questions, don’t hesitate to reach out in the comments – We are here to help!

Share article