Get-MSTeamsUserLicenseCount
    • 21 Aug 2024
    • 2 Minutes to read
    • Contributors
    • Dark
      Light
    • PDF

    Get-MSTeamsUserLicenseCount

    • Dark
      Light
    • PDF

    Article summary

    Return the total number of Teams licensed users for a given tenant.

    Description

    Return the total number of Teams licensed users for a given tenant. Excludes disabled accounts.

    Syntax

    Get-MSTeamsUserLicenseCount
      -TenantName  <String>
      -HideProgressBar
      -ProgressUpdateFreq  <Int32>
      -UserList  <Object>
      -MSClientID  <String>
      -MSClientSecret  <String>
      -MSTenantID  <String>
      -AuthToken  <String>
      -TestMode  <String>
      -ExportCSV  <String>
    

    Examples

    Example 1

    Get-MSTeamsUserLicenseCount -TenantName contoso
    

    Parameters

    -TenantName <String>
    The name of the Nectar DXP tenant. Used in multi-tenant configurations.

    ParameterValue
    Requiredfalse
    Position1
    Requiredfalse
    Default ValueNone
    Accept pipeline input?true (ByPropertyName)
    Accept wildcard characters?false

    -HideProgressBar <SwitchParameter>
    Don't show the progress bar. Cleans up logs when running on Docker.

    ParameterValue
    Requiredfalse
    Positionnamed
    Requiredfalse
    Default ValueFalse
    Accept pipeline input?false
    Accept wildcard characters?false

    -ProgressUpdateFreq <Int32>
    How frequently to show progress updates, in seconds. Defaults to 1 second

    ParameterValue
    Requiredfalse
    Position2
    Requiredfalse
    Default Value1
    Accept pipeline input?false
    Accept wildcard characters?false

    -UserList <Object>
    Use a previously obtained list of Azure user IDs. If this isn't specified, then a list will be downloaded using Get-MSAzureUser

    ParameterValue
    Requiredfalse
    Position3
    Requiredfalse
    Default ValueNone
    Accept pipeline input?false
    Accept wildcard characters?false

    -MSClientID <String>
    The MS client ID for the application granted access to Azure AD.

    ParameterValue
    Requiredfalse
    Position4
    Requiredfalse
    Default ValueNone
    Accept pipeline input?true (ByPropertyName)
    Accept wildcard characters?false

    -MSClientSecret <String>
    The MS client secret for the application granted access to Azure AD.

    ParameterValue
    Requiredfalse
    Position5
    Requiredfalse
    Default ValueNone
    Accept pipeline input?true (ByPropertyName)
    Accept wildcard characters?false

    -MSTenantID <String>
    The MS tenant ID for the O365 customer granted access to Azure AD.

    ParameterValue
    Requiredfalse
    Position6
    Requiredfalse
    Default ValueNone
    Accept pipeline input?true (ByPropertyName)
    Accept wildcard characters?false

    -AuthToken <String>
    The authorization token used for this request. Normally obtained via Get-MSGraphAccessToken

    ParameterValue
    Requiredfalse
    Position7
    Requiredfalse
    Default ValueNone
    Accept pipeline input?true (ByPropertyName)
    Accept wildcard characters?false

    -TestMode <String>
    Sets the mode to run the tests under. Choose from Fast, Basic or Extended. Defaults to Fast mode
    Extended mode checks user O365 Service Plans for both Teams and Enterprise Voice functionality. Most accurate, but slower because it requires pulling down about 10x the data. The process ends up taking about twice as long as Basic mode.
    Basic mode looks at the assigned license SKUs, and also checks to see if TEAMS1 has been disabled. Faster because it requires about 10x less data than Extended mode, but can't obtain information about Enterprise Voice functionality. It's twice as fast as Extended mode, but only returns a total Teams count.
    It doesn't return the Enterprise Voice users.
    Fast mode just returns a total count of assigned licenses. It doesn't check for users with a license but has Teams explicitly disabled. This may over-count, but historically it amounts to a miniscule fraction of total users.

    ParameterValue
    Requiredfalse
    Position8
    Requiredfalse
    Default ValueFast
    Accept pipeline input?false
    Accept wildcard characters?false

    -ExportCSV <String>
    Exports the list of users and the assigned Teams SKU to a CSV file. Requires Basic or Extended test mode

    ParameterValue
    Requiredfalse
    Position9
    Requiredfalse
    Default ValueNone
    Accept pipeline input?false
    Accept wildcard characters?false

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.
    ESC

    Eddy AI, facilitating knowledge discovery through conversational intelligence