How to: Extract Git Permissions from the respective user and repositories

$allUsers = az devops user list 
--org $Organization | ConvertFrom-Json
$allUsers = $allUsers.members $allUsers = $allusers.user | where-object {$_.mailAddress -eq $mailAddress}
$allProjects = az devops project list 
--org $Organization --top 500 | ConvertFrom-Json
$allProjects = $allProjects.value | Where name -EQ $ProjectName
$allrepos = az repos list 
--org $Organization
--project $allProjects.id | ConvertFrom-Json
Foreach ($ar in $allrepos)
{
Write-Host $ar.name
}
$activeUserGroups = az devops security group membership list 
--id $allUsers.principalName
--org $Organization
--relationship memberof | ConvertFrom-Json
$SecurityNameSpaceIdGitRepositories = "2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87"
$gitToken = "repoV2/$($allProjects.id)/$($ar.id)"
$gitCommands = az devops security permission show 
--id $SecurityNameSpaceIdGitRepositories
--subject $activeUserGroups.$aug.descriptor
--token $gitToken
--org $Organization | ConvertFrom-Json

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store