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