Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,21 @@ All notable changes to this project will be documented in this file.

<br> -->

## [0.4.0]

## [UNRELEASED]

### Summary
- _None_

### What's Changed
- feat(Get-AdoUser): Add user support (#124)

### Breaking Changes
- _None_

<br>

## [0.4.0] - 2026-02-13

### Summary
Feature release adding repository initialization support, enhanced user entitlement data, and improved check/approval resource management.
Expand All @@ -29,6 +43,7 @@ Feature release adding repository initialization support, enhanced user entitlem
- feat: Add `ResourceId` parameter to all Check and Approval cmdlets
- feat: Add `New-AdoPushInitialCommit` cmdlet for creating initial commits in Azure DevOps repositories
- chore: Using namespace `System.Collections.Generic` declaration at the module root
- chore(Build.ps1): Update module version to 0.4.0

### Breaking Changes
- _None_
Expand Down Expand Up @@ -76,7 +91,6 @@ Hotfix release focused on bug fixes and code quality improvements. Achieved 100%
- chore: Update CHANGELOG to reflect recent changes and fixes
- chore: Update build version to 0.2.3


### Breaking Changes
- With the output names update in `Add-AdoTeamIteration` and `Get-AdoTeamIteration` cmdlets the output names `team` and `project` are not available anymore, use `teamName` and `projectName` instead.

Expand Down
256 changes: 256 additions & 0 deletions docs/Get-AdoUser.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,256 @@
<!--
document type: cmdlet
external help file: Azure.DevOps.PSModule-Help.xml
HelpUri: https://learn.microsoft.com/en-us/rest/api/azure/devops/graph/users/list
Locale: nl-NL
Module Name: Azure.DevOps.PSModule
ms.date: 02-14-2026
PlatyPS schema version: 2024-05-01
title: Get-AdoUser
-->

<!-- markdownlint-disable MD024 -->
<!-- cSpell: ignore dontshow -->

# Get-AdoUser

## SYNOPSIS

Get a single or multiple users in an Azure DevOps organization.

## SYNTAX

### ListUsers (Default)

```powershell
Get-AdoUser [-CollectionUri <string>] [-ScopeDescriptor <string>] [-SubjectTypes <string[]>]
[-Name <string[]>] [-Version <string>] [<CommonParameters>]
```

### ByDescriptor

```powershell
Get-AdoUser [-CollectionUri <string>] [-UserDescriptor <string>] [-Version <string>]
[<CommonParameters>]
```

## ALIASES

This cmdlet has the following aliases,
- N/A

## DESCRIPTION

This function retrieves a single or multiple users in an Azure DevOps organization through REST API.

## EXAMPLES

### EXAMPLE 1

#### PowerShell

```powershell
Get-AdoUser
```

Retrieves all users in the Azure DevOps organization.

### EXAMPLE 2

#### PowerShell

```powershell
$project = Get-AdoProject -Name 'my-project-1'
$projectDescriptor = (Get-AdoDescriptor -StorageKey $project.Id)

$params = @{
CollectionUri = 'https://dev.azure.com/my-org'
ScopeDescriptor = $projectDescriptor
SubjectTypes = 'aad'
}
Get-AdoUser @params
```

Retrieves all users in the specified project with subject types 'aad'.

### EXAMPLE 3

#### PowerShell

```powershell
@(
'aad.00000000-0000-0000-0000-000000000000',
'aad.00000000-0000-0000-0000-000000000001',
'aad.00000000-0000-0000-0000-000000000002'
) | Get-AdoUser
```

Retrieves the users with the specified descriptors.

## PARAMETERS

### -CollectionUri

Optional.
The collection URI of the Azure DevOps collection/organization, e.g., <https://vssps.dev.azure.com/my-org>.

```yaml
Type: System.String
DefaultValue: $env:DefaultAdoCollectionUri
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -Name

Optional.
A user's display name to filter the retrieved results.

```yaml
Type: System.String[]
DefaultValue: ''
SupportsWildcards: false
Aliases:
- DisplayName
- UserName
ParameterSets:
- Name: ListUsers
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -ScopeDescriptor

Optional.
Specify a non-default scope (collection, project) to search for users.

```yaml
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ListUsers
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -SubjectTypes

Optional.
A comma separated list of user subject subtypes to reduce the retrieved results, e.g.
'msa', 'aad', 'svc' (service identity), 'imp' (imported identity), etc.

```yaml
Type: System.String[]
DefaultValue: "@('msa', 'aad', 'svc', 'imp')"
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ListUsers
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -UserDescriptor

Optional.
The descriptor of a specific user to retrieve.
When provided, retrieves a single user by its descriptor.

```yaml
Type: System.String
DefaultValue: ''
SupportsWildcards: false
Aliases: []
ParameterSets:
- Name: ByDescriptor
Position: Named
IsRequired: false
ValueFromPipeline: true
ValueFromPipelineByPropertyName: true
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues: []
HelpMessage: ''
```

### -Version

Optional.
The API version to use for the request.
Default is '7.2-preview.1'.
The -preview flag must be supplied in the api-version for this request to work.

```yaml
Type: System.String
DefaultValue: 7.2-preview.1
SupportsWildcards: false
Aliases:
- ApiVersion
ParameterSets:
- Name: (All)
Position: Named
IsRequired: false
ValueFromPipeline: false
ValueFromPipelineByPropertyName: false
ValueFromRemainingArguments: false
DontShow: false
AcceptedValues:
- 7.1-preview.1
- 7.2-preview.1
HelpMessage: The -preview flag must be supplied in the api-version for this request to work.
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

- N/A

## OUTPUTS

### PSCustomObject

## NOTES

Retrieves users in an Azure DevOps organization.


## RELATED LINKS

- <https://learn.microsoft.com/en-us/rest/api/azure/devops/graph/users/get>
- <https://learn.microsoft.com/en-us/rest/api/azure/devops/graph/users/list>
1 change: 1 addition & 0 deletions src/Azure.DevOps.PSModule/Azure.DevOps.PSModule.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
'Get-AdoTeamIteration'
'Get-AdoTeamIterationList'
'Get-AdoTeamSettings'
'Get-AdoUser'
'Get-AdoUserEntitlement'
'New-AdoCheckApproval'
'New-AdoCheckBranchControl'
Expand Down
Loading