From 37744aaf655a32bb5d0b31072942e6ae581fef85 Mon Sep 17 00:00:00 2001
From: Antoine Boot <2473792+Antiohne@users.noreply.github.com>
Date: Sun, 15 Feb 2026 13:59:13 +0100
Subject: [PATCH 1/6] fix(Get-AdoUserEntitlement): Corrected error handling
(#128)
---
CHANGELOG.md | 17 +++++++++++++++--
docs/Get-AdoUserEntitlement.md | 2 +-
.../UserEntitlements/Get-AdoUserEntitlement.ps1 | 8 ++++----
.../Get-AdoUserEntitlement.Tests.ps1 | 8 ++++----
4 files changed, 24 insertions(+), 11 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f53858c..cd1f97a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,7 +19,20 @@ All notable changes to this project will be documented in this file.
-->
-## [0.4.0]
+## [UNRELEASED]
+
+### Summary
+- _None_
+
+### What's Changed
+- fix(Get-AdoUserEntitlement): Corrected error handling (#128)
+
+### Breaking Changes
+- _None_
+
+
+
+## [0.4.0] - 2026-02-13
### Summary
Feature release adding repository initialization support, enhanced user entitlement data, and improved check/approval resource management.
@@ -29,6 +42,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_
@@ -76,7 +90,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.
diff --git a/docs/Get-AdoUserEntitlement.md b/docs/Get-AdoUserEntitlement.md
index abdd30f..79473f6 100644
--- a/docs/Get-AdoUserEntitlement.md
+++ b/docs/Get-AdoUserEntitlement.md
@@ -253,7 +253,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### PSCustomObject
-The dictionary contains user entitlements:
+Returns one or more user entitlement objects with the following properties:
- `accessLevel`: User's access level denoted by a license.
- `extensions`: User's extensions.
- `groupAssigments`: [Readonly] GroupEntitlements that this user belongs to.
diff --git a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1 b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
index 607aef8..e6d9444 100644
--- a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
+++ b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
@@ -29,9 +29,9 @@
Optional. Version of the API to use. Default is '7.1'.
.OUTPUTS
- System.Collections.Specialized.OrderedDictionary
+ PSCustomObject
- The dictionary contains user entitlements:
+ Returns one or more user entitlement objects with the following properties:
- `accessLevel`: User's access level denoted by a license.
- `extensions`: User's extensions.
- `groupAssigments`: [Readonly] GroupEntitlements that this user belongs to.
@@ -174,8 +174,8 @@
} while ($continuationToken)
} catch {
- if ($_.ErrorDetails.Message -match 'MemberNotFoundException') {
- Write-Warning "Identity not found with ID $UserId, skipping."
+ if ($_.ErrorDetails.Message -match 'UserEntitlementNotFoundException') {
+ Write-Warning "User entitlement not found for ID $UserId, skipping."
} else {
throw $_
}
diff --git a/src/Azure.DevOps.PSModule/Tests/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.Tests.ps1 b/src/Azure.DevOps.PSModule/Tests/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.Tests.ps1
index 2e5caea..2d32eda 100644
--- a/src/Azure.DevOps.PSModule/Tests/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.Tests.ps1
+++ b/src/Azure.DevOps.PSModule/Tests/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.Tests.ps1
@@ -215,10 +215,10 @@ Describe 'Get-AdoUserEntitlement' {
Mock -ModuleName Azure.DevOps.PSModule Confirm-Default { }
}
- It 'Should warn when user does not exist (MemberNotFoundException)' {
- $exception = New-Object System.Management.Automation.RuntimeException('MemberNotFoundException: User not found')
- $errorRecord = New-Object System.Management.Automation.ErrorRecord($exception, 'UserNotFound', 'ObjectNotFound', $null)
- $errorRecord.ErrorDetails = New-Object System.Management.Automation.ErrorDetails('MemberNotFoundException: User not found')
+ It 'Should warn when user entitlement does not exist (UserEntitlementNotFoundException)' {
+ $exception = New-Object System.Management.Automation.RuntimeException('UserEntitlementNotFoundException: User entitlement not found')
+ $errorRecord = New-Object System.Management.Automation.ErrorRecord($exception, 'UserEntitlementNotFoundException', 'ObjectNotFound', $null)
+ $errorRecord.ErrorDetails = New-Object System.Management.Automation.ErrorDetails('UserEntitlementNotFoundException: User entitlement not found')
Mock -ModuleName Azure.DevOps.PSModule Invoke-AdoRestMethod { throw $errorRecord }
From 1b4d3103a3e09130942b0e992ee6f1c53bc342db Mon Sep 17 00:00:00 2001
From: Antoine Boot <2473792+Antiohne@users.noreply.github.com>
Date: Sun, 15 Feb 2026 14:00:57 +0100
Subject: [PATCH 2/6] Undo changes to Get-AdoUserEntitlement
---
docs/Get-AdoUserEntitlement.md | 2 +-
.../UserEntitlements/Get-AdoUserEntitlement.ps1 | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/Get-AdoUserEntitlement.md b/docs/Get-AdoUserEntitlement.md
index 79473f6..abdd30f 100644
--- a/docs/Get-AdoUserEntitlement.md
+++ b/docs/Get-AdoUserEntitlement.md
@@ -253,7 +253,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### PSCustomObject
-Returns one or more user entitlement objects with the following properties:
+The dictionary contains user entitlements:
- `accessLevel`: User's access level denoted by a license.
- `extensions`: User's extensions.
- `groupAssigments`: [Readonly] GroupEntitlements that this user belongs to.
diff --git a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1 b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
index e6d9444..4208559 100644
--- a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
+++ b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
@@ -29,9 +29,9 @@
Optional. Version of the API to use. Default is '7.1'.
.OUTPUTS
- PSCustomObject
+ System.Collections.Specialized.OrderedDictionary
- Returns one or more user entitlement objects with the following properties:
+ The dictionary contains user entitlements:
- `accessLevel`: User's access level denoted by a license.
- `extensions`: User's extensions.
- `groupAssigments`: [Readonly] GroupEntitlements that this user belongs to.
From 42fe253b3c8f0f889b950bf83ee628a1e087f672 Mon Sep 17 00:00:00 2001
From: Antoine Boot <2473792+Antiohne@users.noreply.github.com>
Date: Sun, 15 Feb 2026 14:02:42 +0100
Subject: [PATCH 3/6] Update documentation
---
docs/Get-AdoUserEntitlement.md | 2 +-
.../UserEntitlements/Get-AdoUserEntitlement.ps1 | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/Get-AdoUserEntitlement.md b/docs/Get-AdoUserEntitlement.md
index abdd30f..79473f6 100644
--- a/docs/Get-AdoUserEntitlement.md
+++ b/docs/Get-AdoUserEntitlement.md
@@ -253,7 +253,7 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### PSCustomObject
-The dictionary contains user entitlements:
+Returns one or more user entitlement objects with the following properties:
- `accessLevel`: User's access level denoted by a license.
- `extensions`: User's extensions.
- `groupAssigments`: [Readonly] GroupEntitlements that this user belongs to.
diff --git a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1 b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
index 4208559..e6d9444 100644
--- a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
+++ b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
@@ -29,9 +29,9 @@
Optional. Version of the API to use. Default is '7.1'.
.OUTPUTS
- System.Collections.Specialized.OrderedDictionary
+ PSCustomObject
- The dictionary contains user entitlements:
+ Returns one or more user entitlement objects with the following properties:
- `accessLevel`: User's access level denoted by a license.
- `extensions`: User's extensions.
- `groupAssigments`: [Readonly] GroupEntitlements that this user belongs to.
From 995bebd4d8b25d14436061da1e2a0f0bdeae3edd Mon Sep 17 00:00:00 2001
From: Antoine Boot <2473792+Antiohne@users.noreply.github.com>
Date: Mon, 16 Feb 2026 12:57:39 +0000
Subject: [PATCH 4/6] Remove backticks and correct changelog
---
CHANGELOG.md | 2 +-
docs/Get-AdoUserEntitlement.md | 18 +++++++++---------
.../Get-AdoUserEntitlement.ps1 | 16 ++++++++--------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cd1f97a..5e983b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -25,7 +25,7 @@ All notable changes to this project will be documented in this file.
- _None_
### What's Changed
-- fix(Get-AdoUserEntitlement): Corrected error handling (#128)
+- fix(Get-AdoUserEntitlement): Correct error handling (#128)
### Breaking Changes
- _None_
diff --git a/docs/Get-AdoUserEntitlement.md b/docs/Get-AdoUserEntitlement.md
index 79473f6..d116d00 100644
--- a/docs/Get-AdoUserEntitlement.md
+++ b/docs/Get-AdoUserEntitlement.md
@@ -254,15 +254,15 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### PSCustomObject
Returns one or more user entitlement objects with the following properties:
-- `accessLevel`: User's access level denoted by a license.
-- `extensions`: User's extensions.
-- `groupAssigments`: [Readonly] GroupEntitlements that this user belongs to.
-- `id`: The unique identifier which matches the Id of the Identity associated with the GraphMember.
-- `dateCreated`: [Readonly] Date the member was added to the collection.
-- `lastAccessedDate`: [Readonly] Date the user last accessed the collection.
-- `projectEntitlements`: Relation between a project and the user's effective permissions in that project.
-- `user`: User reference.
-- `collectionUri`: The collection URI.
+- accessLevel: User's access level denoted by a license.
+- extensions: User's extensions.
+- groupAssigments: [Readonly] GroupEntitlements that this user belongs to.
+- id: The unique identifier which matches the Id of the Identity associated with the GraphMember.
+- dateCreated: [Readonly] Date the member was added to the collection.
+- lastAccessedDate: [Readonly] Date the user last accessed the collection.
+- projectEntitlements: Relation between a project and the user's effective permissions in that project.
+- user: User reference.
+- collectionUri: The collection URI.
## NOTES
diff --git a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1 b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
index e6d9444..336b393 100644
--- a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
+++ b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
@@ -32,14 +32,14 @@
PSCustomObject
Returns one or more user entitlement objects with the following properties:
- - `accessLevel`: User's access level denoted by a license.
- - `extensions`: User's extensions.
- - `groupAssigments`: [Readonly] GroupEntitlements that this user belongs to.
- - `id`: The unique identifier which matches the Id of the Identity associated with the GraphMember.
- - `lastAccessedDate`: [Readonly] Date the user last accessed the collection.
- - `projectEntitlements`: Relation between a project and the user's effective permissions in that project.
- - `user`: User reference.
- - `collectionUri`: The collection URI.
+ - accessLevel: User's access level denoted by a license.
+ - extensions: User's extensions.
+ - groupAssigments: [Readonly] GroupEntitlements that this user belongs to.
+ - id: The unique identifier which matches the Id of the Identity associated with the GraphMember.
+ - lastAccessedDate: [Readonly] Date the user last accessed the collection.
+ - projectEntitlements: Relation between a project and the user's effective permissions in that project.
+ - user: User reference.
+ - collectionUri: The collection URI.
.LINK
https://learn.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user-entitlements/get
From c398aca65d994b3b6ebb26fdefe378a99f7c586d Mon Sep 17 00:00:00 2001
From: Antoine Boot <2473792+Antiohne@users.noreply.github.com>
Date: Tue, 17 Feb 2026 13:39:35 +0000
Subject: [PATCH 5/6] Remove PSCustomObject documentation
---
docs/Get-AdoUserEntitlement.md | 11 -----------
.../UserEntitlements/Get-AdoUserEntitlement.ps1 | 10 ----------
2 files changed, 21 deletions(-)
diff --git a/docs/Get-AdoUserEntitlement.md b/docs/Get-AdoUserEntitlement.md
index d116d00..6a89cf0 100644
--- a/docs/Get-AdoUserEntitlement.md
+++ b/docs/Get-AdoUserEntitlement.md
@@ -253,17 +253,6 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
### PSCustomObject
-Returns one or more user entitlement objects with the following properties:
-- accessLevel: User's access level denoted by a license.
-- extensions: User's extensions.
-- groupAssigments: [Readonly] GroupEntitlements that this user belongs to.
-- id: The unique identifier which matches the Id of the Identity associated with the GraphMember.
-- dateCreated: [Readonly] Date the member was added to the collection.
-- lastAccessedDate: [Readonly] Date the user last accessed the collection.
-- projectEntitlements: Relation between a project and the user's effective permissions in that project.
-- user: User reference.
-- collectionUri: The collection URI.
-
## NOTES
- N/A
diff --git a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1 b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
index 336b393..542f9d1 100644
--- a/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
+++ b/src/Azure.DevOps.PSModule/Public/MemberEntitlementManagement/UserEntitlements/Get-AdoUserEntitlement.ps1
@@ -31,16 +31,6 @@
.OUTPUTS
PSCustomObject
- Returns one or more user entitlement objects with the following properties:
- - accessLevel: User's access level denoted by a license.
- - extensions: User's extensions.
- - groupAssigments: [Readonly] GroupEntitlements that this user belongs to.
- - id: The unique identifier which matches the Id of the Identity associated with the GraphMember.
- - lastAccessedDate: [Readonly] Date the user last accessed the collection.
- - projectEntitlements: Relation between a project and the user's effective permissions in that project.
- - user: User reference.
- - collectionUri: The collection URI.
-
.LINK
https://learn.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user-entitlements/get
https://learn.microsoft.com/en-us/rest/api/azure/devops/memberentitlementmanagement/user-entitlements/search-user-entitlements
From 39e2290bd1340bf742b7fe091a75b02a04a397ec Mon Sep 17 00:00:00 2001
From: Antoine Boot <2473792+Antiohne@users.noreply.github.com>
Date: Tue, 17 Feb 2026 16:34:35 +0000
Subject: [PATCH 6/6] Update changelog
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bf358b9..9bf0755 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,7 +34,7 @@ All notable changes to this project will be documented in this file.
-## [0.4.0] - 2026-02-13 - 2026-02-13
+## [0.4.0] - 2026-02-13
### Summary
Feature release adding repository initialization support, enhanced user entitlement data, and improved check/approval resource management.