Get-MSTeamsUserLicense
    • 25 Sep 2024
    • 2 Minutes to read
    • Dark
      Light
    • PDF

    Get-MSTeamsUserLicense

    • Dark
      Light
    • PDF

    Article summary

    Return Teams licensed users for a given tenant.

    Description

    Return Teams licensed users for a given tenant. Excludes disabled accounts.

    Syntax

    Get-MSTeamsUserLicense
      -CountOnly  <Boolean>
      -LicenseType  <String>
      -ExportCSV  <String>
      -TenantName  <String>
      -HideProgressBar
      -ProgressUpdateFreq  <Int32>
      -UserList  <Object>
      -MSClientID  <String>
      -MSClientSecret  <String>
      -MSTenantID  <String>
      -AuthToken  <String>
    

    Examples

    Example 1

    Get-MSTeamsUserLicense -TenantName contoso
    

    Shows the Teams user count for Contoso

    Example 2

    Get-MSTeamsUserLicense -ExportCSV TeamsList.csv
    

    Exports a list of all Teams users to a CSV file

    Example 3

    Get-MSTeamsUserLicense -ExportCSV TeamsList-EV.csv -LicenseType EV
    

    Exports a list of all Teams users with a Phone license to a CSV file

    Parameters

    -CountOnly <Boolean>
    Only return a total count. Much faster than pulling the entire list of users. Shows columns for All Teams licensed users, Teams Phone licensed users and MTR license counts. This is on by default.

    ParameterValue
    Requiredfalse
    Position1
    Requiredfalse
    Default ValueTrue
    Accept pipeline input?false
    Accept wildcard characters?false

    -LicenseType <String>
    What license type of Teams licensed users to export. Choose from All, EV, MTR. Only useful when pulling the entire user list, instead of a count. Defaults to All.

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

    -ExportCSV <String>
    Exports the list of users and the assigned Teams SKU to a CSV file. Assumes CountOnly is $FALSE

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

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

    ParameterValue
    Requiredfalse
    Position4
    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
    Position5
    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
    Position6
    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
    Position7
    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
    Position8
    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
    Position9
    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
    Position10
    Requiredfalse
    Default ValueNone
    Accept pipeline input?true (ByPropertyName)
    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