Refactored User Access Audit Script Using Azure.DevOps.PSModule #140
msc365admin
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I recently refactored the User Access Audit Script from Microsoft Learn to use the Azure.DevOps.PSModule, leveraging the latest capabilities introduced in version v0.4.1.
The key enabler for this update is the expanded functionality in three of the module’s cmdlets; along with the newest (unreleased) extension of Get-AdoMembership, which now supports deeper traversal of group and group memberships. This makes the entire audit workflow cleaner, faster, and far less dependent on custom REST calls.
Why the Refactor?
The original script relied on manually invoking the Azure DevOps REST API. With the latest Azure.DevOps.PSModule improvements, we can now:
Example Refactored Audit Script
Below is the updated version adapted to use Get-AdoUser, Get-AdoGroup, and the enhanced Get-AdoMembership cmdlet:
Note
This example script can only be executed locally because the Get-AdoMembership cmdlet contains unreleased updates at the time of writing.
Any Thoughts?
I’d love to get feedback from others working with the Azure.DevOps.PSModule or performing access audits.
Let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions