How to: Extract Project Level Permissions from the respective user, and project

$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
$activeUserGroups = az devops security group membership list 
--id $allUsers.principalName
--org $Organization
--relationship memberof | ConvertFrom-Json
$SecurityNameSpaceIds = @(    
[pscustomobject]@{
SecurityNameSpace='Project';
SecurityIdSpace='52d39943-cb85-4d7f-8fa8-c6baac873819'}
[pscustomobject]@{
SecurityNameSpace='Tagging';
SecurityIdSpace='bb50f182-8e5e-40b8-bc21-e8752a1e7ae2'}
[pscustomobject]@{
SecurityNameSpace='AnalyticsViews';
SecurityIdSpace='d34d3680-dfe5-4cc6-a949-7d9c68f73cba'}
[pscustomobject]@{
SecurityNameSpace='Analytics';
SecurityIdSpace='58450c49-b02d-465a-ab12-59ae512d6531'}
)
'Project' { $Token = "`$PROJECT:vstfs:///Classification/TeamProject/$($allProjects.id)" }
'Tagging' { $Token = "/$($allProjects.id)" }
'AnalyticsViews' { $Token = "`$/Shared/$($allProjects.id)" }                
'Analytics' { $Token = "`$/$($allProjects.id)" }
$projectCommands = az devops security permission show 
--id $snsi.SecurityIdSpace
--subject $activeUserGroups.$aug.descriptor
--token $Token
--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