Skip to main content

Get-VSTeamUser

SYNOPSIS

Returns a list of users for the account.

SYNTAX

List (Default)

Get-VSTeamUser [-SubjectTypes <String[]>] [<CommonParameters>]

ByUserDescriptor

Get-VSTeamUser -Descriptor <String> [<CommonParameters>]

DESCRIPTION

Returns a list of users for the account.

EXAMPLES

Example 1

Get-VSTeamUser

Returns a list of all users for the account.

Example 2

Get-VSTeamUser -SubjectTypes vss,msa

Returns a list of users for the account filtered by the specified subject types: Azure DevOps User (vss) and Microsoft Account (msa).

Example 3

Get-VSTeamUser -Descriptor "vssA1B2C3D4E5F6"

Returns the user with the specified descriptor "vssA1B2C3D4E5F6".

PARAMETERS

-SubjectTypes

A comma separated list of user subject subtypes to reduce the retrieved results. Valid subject types:

  • vss (Azure DevOps User)
  • aad (Azure Active Directory User)
  • svc (Azure DevOps Service Identity)
  • imp (Imported Identity)
  • msa (Microsoft Account)
Type: String[]
Parameter Sets: List
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Descriptor

The descriptor of the desired graph user.

Type: String
Parameter Sets: ByUserDescriptor
Aliases: memberDescriptor, UserDescriptor

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Prerequisites:

Set the account and version that all calls will use with Set-VSTeamAccount. Default version sets to API version 3.0 (TFS2017) if not manually set.

tips:

  • check called version of the API with Get-VSTeamAPIVersion or Get-VSTeamInfo
  • use Set-VSTeamDefaultProject to set default project for every call
  • use Set-VSTeamDefaultAPITimeout to change the default timeout of 60 seconds for all calls.
  • use Profiles to load an account and the correct version