You can use something like this:
Get-MsolUser | ? {$_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "TEAMS1" -and $_.ProvisioningStatus -eq "Success"}}
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Dear Team
I want to know about the poerwshell scriot which can give list of users with microsoft teams licenses as part of E3
In my organization we have applied e3 liceses only for sharepoint and few only for teams
I need the script to list user only with ms teams active licenses
You can use something like this:
Get-MsolUser | ? {$_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "TEAMS1" -and $_.ProvisioningStatus -eq "Success"}}
Follow this article to install MSOnline module : Connect with the Microsoft Azure Active Directory Module for Windows PowerShell
Then connect to Azure AD with command below:
Connect-MsolService
After that, you can use command provided by michev to filter the suitable account.
If there also exist other subscriptions plan(such as E5, business) in your organization, you can use command below to only check for account which has E3 license:
Get-MsolUser | where {$_.Licenses.AccountSkuId -like "*e3*"} | where {$_.Licenses.ServiceStatus | ? {$_.ServicePlan.ServiceName -eq "TEAMS1" -and $_.ProvisioningStatus -eq "Success"}}