🎉 Our Office 365 Reporting Tool is now available in Azure Marketplace 🚀
This website uses cookies to improve your experience. We'll assume you're ok with this. Know more.
Microsoft Teams

How to Find Inactive Users in Microsoft Teams

Inactive users in Microsoft Teams not only disrupt team collaboration but also weaken security and reduce overall productivity. Unmonitored accounts can lead to unnecessary license costs and inefficient resource utilization. This guide helps you identify and manage inactive users to ensure an active Microsoft Teams environment.

Get Teams Inactive Users Report using Microsoft 365 Admin Center

Microsoft 365 Permission Required
Reports Reader Least Privilege
Global Admin Most Privilege
  • Log in to the Microsoft 365 admin center.
  • Navigate to User activity tab under Reports»Usage»Microsoft Teams.
  • Here, you can view the Last activity date of all licensed users in Microsoft Teams.
Get Teams Inactive Users Report using Microsoft 365 Admin Center
  • Note: There is no direct way to get inactive users report in Microsoft Teams with native solutions, but you can determine inactivity by reviewing each user's last activity date in Teams user status report.

Export Teams Inactive Users Report using PowerShell

Microsoft 365 Permission Required
Reports Reader Least Privilege
Global Admin Most Privilege
  • Connect to the Microsoft Graph PowerShell module using the below cmdlet.
  • Windows PowerShell Windows PowerShell
     Connect-MgGraph –Scopes "Reports.Read.All"
  • Run the following cmdlet to get the last activity date of all licensed users in MS Teams.
  • Windows PowerShell Windows PowerShell
     Get-MgReportTeamUserActivityUserDetail -Period <Days> -OutFile <FilePath>
  • You can filter the Microsoft Teams user activity report to identify users with no activity after a specific date and users who have never used Teams.
Export Teams Inactive Users Report using PowerShell
  • Note: Replace <Days> with D7, D30, D90, or D180 to specify the reporting period. Replace <FilePath> with the desired file location to save the report.

Explore Insights on Inactive Teams Users in Microsoft 365 to Optimize Security and Licensing!

The AdminDroid’s Microsoft Teams reporting tool provides detailed reports on Teams inactive users based on their last meeting, team chat, private chat, and call activity. Beyond these, it also offers insights into inactive users, team memberships, device usage, and more.

Track Inactive Teams Users' Activities to Avoid Security Threats

Keep an eye on Microsoft Teams user activity across chats, calls, and meetings to detect and prevent any malicious actions through inactive Teams users.

Detect and Remove Teams Add-on Licenses from Inactive Users

Use AdminDroid's advanced filter in the licensed users report to identify inactive users assigned with Teams add-on licenses and revoke them for better license management.

Discover Inactive Users in Teams by Access Platforms

Track the last activity date of all inactive users across various platforms such as Windows, Mac, mobile, and web to restrict Microsoft Teams sign-in on unmanaged devices and reduce the attack surface.

Audit Guest User Activities in Teams Environment

Monitor external user activities in Microsoft Teams to track guest users' engagement and remove inactive external users to streamline access control and optimize external collaboration.

Manage Inactive User Accounts in Microsoft 365

Monitor inactive users in Microsoft 365 to identify idle accounts across all M365 services, then disable or delete them to prevent unauthorized access and optimize licensing costs.

Handle Inactive Owners for Teams Governance

Assign active owners to teams with disabled owners to prevent inactive ownership and ensure proper governance across Microsoft 365.

Overall, AdminDroid’s Microsoft Teams management tool streamlines team oversight with detailed reports on activity, membership, and usage. It enables admins to track inactive users, monitor file sharing, and analyze sign-ins for better license optimization and security.

Explore a full range of reporting options

Important Tips

Instead of manually assigning teams membership to guests, use access packages for external users and grant time-limited access to prevent inactivity and enhance security.

Assign appropriate owners for critical teams before removing the inactive owners to ensure efficient Microsoft Teams management.

Use access reviews on guest users in Microsoft Entr a ID to identify all inactive guest users across teams and revoke their access.

Common Errors and Resolution Steps

The following are the possible errors and troubleshooting hints while finding inactive users report in Microsoft Teams.

Error Needs permission to access resources in your organization that only an admin can grant. Please ask an admin to grant permission to this app before you can use it.

This error occurs when a user or least privileged admin tries to connect to the Microsoft Graph PowerShell module without an admin consent on behalf of the organization.

Fix Ask the Global Admin for the respective scope’s consent to be provided on behalf of the organization.

Error Get-MgReportTeamUserActivityUserDetail : {"error":{"code":"S2SUnauthorized","message":"Invalid permission."}}

This error occurs when running the 'Get-MgReportTeamUserActivityUserDetail' cmdlet in PowerShell without necessary scope permissions or role assignments.

Fix Ensure you have at least the Reports Reader admin role and then connect to the Microsoft Graph PowerShell with Reports.Read.All permission.
Connect-MgGraph –Scopes "Reports.Read.All"

Error Get-MgReportTeamUserActivityUserDetail : A positional parameter cannot be found that accepts argument 'Reports\TeamsUserActivityDetails.csv'.

This error occurs when the output file path is not properly provided.

Fix Ensure that the -OutFile path is correctly formatted to prevent errors.
Get-MgReportTeamUserActivityUserDetail -Period D180 -OutFile "D:\Teams Reports\TeamsUserActivityDetails.csv"

Error Information is concealed for privacy. To see identifiable information, learn about showing these details in reports.

This error occurs in Microsoft usage reports when your organization has enabled the 'Display concealed names in all reports' setting in the Microsoft 365 admin center.

Fix To view user display names in the Teams usage report, enable identifiable usernames in the Microsoft 365 admin center.

1. How to check the user login history in Microsoft Teams?

Reviewing sign-in logs in Microsoft Teams helps to identify inactive users who have not signed in for an extended period. It also highlights failed sign-in attempts by those users. This helps you investigate the cause, analyze inactivity patterns, address potential security risks, and ensure proper access management.

Get Teams User Login Activities in Microsoft Entra Portal

  • Log in to the Microsoft Entra admin center and navigate to Sign-in logs under Identify»Monitoring & health.
  • In the 'Add filters' option, choose Application, and click Apply.
  • Enter the application name 'Microsoft Teams' in the selected filter and click Apply to view all user login activities in MS Teams.
entra-user-sign-in-logs-in-ms-teams

Note: Filter the logs by date range and specific user to find their last sign-in time from the first entry. By default, the logs show data for the last 24 hours, but you can customize the date range up to 30 days.

Export User Sign-in Logs for Microsoft Teams Using PowerShell

Connect to the Microsoft Graph PowerShell module using the cmdlet below.

Connect–MgGraph –Scopes "AuditLog.Read.All"

Run the following cmdlet in PowerShell to export Microsoft Teams login activities.

Get-MgAuditLogSignIn -Filter "startsWith(appDisplayName,'Microsoft Teams')" -All | Select-Object CreatedDateTime, UserDisplayName, UserPrincipalName, IPAddress, AppDisplayName | Export-Csv -Path <FilePath>
get-teams-user-login-history-powershell

While native reports provide a general overview of user sign-ins in MS Teams, AdminDroid enhances this with detailed breakdowns like graphical charts, and advanced filters!

  • The Teams login activities report lists user's login history in MS Teams along with details, such as logged-in time, logged-in user, result status, client info, IP address, and more.
  • These logs can be reviewed to investigate suspicious logins and unauthorized access attempts.
admindroid-teams-login-activities

Handy tip: Utilize the Export capability to download the Microsoft Teams sign-in logs report in various formats like CSV, PDF, and HTML for further analysis.

2. How to find inactive users in teams using access review?

Manual tracking of inactive users is time-consuming, error-prone, and does not allow you to identify inactive users within specific teams. Microsoft Entra access reviews automate inactive user detection from specific group, notifies reviewers, and enforces access removal upon approval.

Note: Finding inactive users in Teams or groups using Access Reviews requires a Microsoft Entra ID Governance license.

To find inactive accounts in Microsoft Teams using Access Reviews, navigate to Identity Governance»Access Reviews in the Entra portal and follow the steps below.

Set Up Access Review for Inactive Accounts in Microsoft Teams

  • Click "+ New Access review" and choose Teams + Groups under Select what to review.
  • Set the Review scope to Select Teams + Groups, then click "+ Select group(s)", and choose the teams you want to review. In the Scope, select All users.
  • Select Inactive users only and specify the number of inactive days. Then, click Next: Reviews.
access-review-find-inactive-teams-users-step1

Configure Review Stages, Reviewers, & Recurrences

  • Select Multi-stage review for multiple reviews of inactive users. Leave it unset for a single-stage review.
  • In the 'Specify reviewers' section, select who will evaluate inactive users.
  • Under Specify recurrence of review section, specify the duration (in days), required Review recurrence and Start date.
  • Then, select 'End after number of occurrences' for End section and set the required number of 'Occurences'. Then, click Next: Settings.
access-review-find-inactive-teams-users-step2

Note: If you select Group owner(s) or Managers of users as primary reviewers, you can set Fallback reviewers to handle reviews when a group has no assigned owner or a user has no assigned manager.

Configure Additional Settings and Create Access Review

  • Configure the additional settings based on your requirements and click Next: Review + Create.
  • Give the access review a name, add a description, and click Create to finalize the review setup.
  • Once the review is set up, reviewers receive email notifications to evaluate inactive users.
access-review-find-inactive-teams-users-step3

Reviewers can approve, remove, or request additional details about user access. After review completion, Microsoft Entra enforces decisions based on the configured settings.

3. How to remove inactive users from specific teams in Microsoft 365?

Identifying inactive users in teams is only the first step. The crucial part is to remove them to prevent unauthorized access and optimize license usage. Since teams are linked to Microsoft 365 groups, removing a user from a team also results in their removal from the associated M365 group.

Remove Inactive Users from a Team via Teams Admin Center

  • Log in to the Microsoft Teams admin center and navigate to Teams»Manage teams.
  • Click on the respective team to find the team membership of inactive users.
  • In the Members tab, find the inactive user in the list, select their name, and click Remove to revoke their access from the team.
remove-inactive-user-from-a-team-admin-center

While the Microsoft Teams admin center allows you to remove inactive users, manually reviewing each team is time-consuming. PowerShell offers a more efficient approach by allowing you to quickly identify and remove inactive users across all teams.

Remove Inactive Users from Teams Using PowerShell

Connect to the Microsoft Teams PowerShell module using the cmdlet below.

Connect-MicrosoftTeams

Run the following PowerShell snippet to remove inactive users from teams in Microsoft 365 by replacing <User1> and <User2> with the list of inactive users' UPNs.

$users = @("<User1>", "<User2>") 
	foreach ($User in $Users) { 
		$teams = Get-Team -User $User | Select-Object -ExpandProperty GroupId 
		foreach ($Team in $Teams) { Remove-TeamUser -GroupId $Team -User $User } 
}

The above snippet identifies the team membership of listed users and removes them from their respective teams.

Monitor teams membership removal activities in real-time with AdminDroid reports!

  • With members removed from teams report, you can audit all teams member removals in Microsoft Teams.
  • This report helps you identify who removed the user from the team and check if they were inactive with details such as removed time, team name, removed members, and more insights.
admindroid-members-removed-from-teams

4. How to remove Microsoft Teams license from an inactive user?

Inactive users in MS Teams pose security risks if their sign-in or data access is not revoked. Disabling Teams prevents them from accessing sensitive data. While the core Teams license is bundled with Microsoft 365, removing add-ons like Teams Premium, Audio Conferencing, Teams Phone Standard, and more helps optimize costs by eliminating unnecessary expenses.

Remove Teams License from User Using M365 Admin Center

  • Navigate to the Active users page in the Microsoft 365 admin center.
  • Search for the inactive user and click their name.
  • Go to the Licenses and apps tab.
  • In the Apps section, uncheck the Microsoft Teams product license to disable Microsoft Teams access to that specific user, then click Save changes.
m365-admin-center-remove-teams-license-from-a-user

Remove Teams License from Inactive Users Using PowerShell

Connect to the Microsoft Graph PowerShell module using the cmdlet below.

Connect-MgGraph -Scopes "Organization.Read.All", "LicenseAssignment.ReadWrite.All", "User.ReadWrite.All" 

Run the below PowerShell cmdlet to find the SkuPartNumber or SkuID of the enterprise subscription that contains Teams license or to identify a Teams add-on license.

Get-MgSubscribedSku –All | Format-List

Then, run the following PowerShell snippet to remove a Microsoft Teams license from an inactive user by replacing <SkuPartNumber> and <UserUPN> with the correct values.

$Subscription = Get-MgSubscribedSku -All | Where-Object SkuPartNumber -eq '<SkuPartNumber>' 
$DisabledPlans = $Subscription.ServicePlans | Where-Object ServicePlanName -eq 'TEAMS1' | Select-Object -ExpandProperty ServicePlanId 
$AddLicenses = @( @{ SkuId = $Subscription.SkuId;  DisabledPlans = $DisabledPlans } ) 
Set-MgUserLicense -UserId "<UserUPN>" -AddLicenses $AddLicenses -RemoveLicenses @()

To remove the Teams add-on license from an inactive user in Microsoft 365, run the below PowerShell cmdlet.

Set-MgUserLicense -UserId "<UserUPN>" -RemoveLicenses @("<SkuId>") -AddLicenses @{}

Removing Teams add-on licenses for inactive users reduces unnecessary costs, but it does not remove their access to other Microsoft 365 services. To fully restrict access, consider disabling sign-ins or removing licenses at the tenant level.

Kickstart Your Journey With
AdminDroid

Your Microsoft 365 Companion with Enormous Reporting Capabilities

Download Now
User Help Manuals Compliance Docs
x
Delivering Reports on Time
Want a desired Microsoft 365 reports every Monday morning? Ensure automated report distribution and timely delivery with AdminDroid's Scheduling to your email anytime you need.
Delivering Reports on Time
Schedule tailored reports to execute automatically at the time you set and deliver straight to the emails you choose. In addition, you can customize report columns and add inteligent filtering to the activities just from the previous day to suit your Microsoft 365 report requirements.
Set It, Schedule It, See Results- Your Reports, Your Way, On Your Time!
Time Saving
Automation
Customization
Intelligent Filtering
Give Just the Right Access to the Right People
Grant fine-tuned access to any Microsoft 365 user with AdminDroid’s Granular Delegation and meet your organization’s security and compliance requirements.
Give Just the Right Access to the Right People
Create custom roles loaded with just the right permissions and give access to admins or normal users within AdminDroid. The result? A streamlined Microsoft 365 management experience that aligns your organization's security protocols and saves your invaluable time and effort.
Align, Define, Simplify: AdminDroid's Granular Delegation
Smart Organizational Control
Effortless M365 Management
Simplified Access
Advanced Alerts at a Glance
Receive quick notifications for malicious Microsoft 365 activities. Engage with the AdminDroid’s real-time alert policies crafted to streamline your security investigations.
Advanced Alerts at a Glance
Stay informed of critical activities like suspicious emails and high-risk logins, bulk file sharing, etc. Through creating and validating ideal alert policies, AdminDroid provides a comprehensive approach to real-time monitoring and management of potential threats within your organization.
AdminDroid Keeps You Always Vigilant, Never Vulnerable!
Proactive Protection
Real-time Monitoring
Security Intelligence
Threat Detection
Merge the Required Data to One Place
Combine multiple required columns into one comprehensive report and prioritize the information that matters most to you with AdminDroid’s Advanced Column Customization.
Merge the Required Data to One Place
This column merging capability offers a flexible way to add different columns from various reports and collate all the essential data in one place. Want to revisit the customized report? Save it as a 'View’, and your unique report is ready whenever you need it.
Merge with Ease and Save as Views!
Custom Reporting
Unique View
Desired Columns
Easy Data Interpretation
Insightful Charts and Exclusive Dashboards
Get a quick and easy overview of your tenant's activity, identify potential problems, and take action to protect your data with AdminDroid’s Charts and Dashboards.
Insightful Charts and Exclusive Dashboards
With AdminDroid charts and dashboards, visualize your Microsoft 365 tenant in ways you've never thought possible. It's not just about viewing; it's about understanding, controlling, and transforming your Microsoft 365 environment.
Explore Your Microsoft 365 Tenant in a Whole New Way!
Executive overviews
Interactive insights
Decision-making
Data Visualization
Efficient Report Exporting for Microsoft 365
Downloading your reports in the right file format shouldn’t be a hassle with AdminDroid’s Report Export. Experience seamless report exporting in various formats that cater to your needs.
Efficient Report Exporting for Microsoft 365
Navigate through diverse options and export Microsoft 365 reports flawlessly in your desired file format. Tailor your reports precisely as you need them and save them directly to your computer.
Take Control, Customize and Deliver- Your Office 365 Data, Exported in Your Way!
Easy Export
Seamless Downloading
Data Control
Manage Microsoft 365

Get AdminDroid Office 365 Reporter Now!