-1

Looking for options for exporting all the Groups/Users from Azure DevOps Server(OnPrem). We are on Azure Devops Server 2019

James Z
  • 12,209
  • 10
  • 24
  • 44

2 Answers2

1

For Azure DevOps Server 2019 you may use the REST API 5.0, see https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-6.1#api-and-tfs-version-mapping

E.g. you can query for the accounts, the profiles or the member entitlements

Unfortunately for you, the audit access is only available with REST 5.1

milbrandt
  • 1,438
  • 2
  • 15
  • 20
1

This will give you all the members in the Organisation

$AzDOS = 'FQDN'
$Organisation = 'OrgName'

# Teams - Get All Teams
$allTeams = Invoke-RestMethod -UseDefaultCredentials "https://$AzDos/$Organisation/_apis/teams?api-version=5.1-preview.3" | 
    select -ExpandProperty value

# Teams - Get Team Members With Extended Properties
$allTeamsMembers = foreach ($team in $allTeams){
    Invoke-RestMethod -UseDefaultCredentials "https://$AzDos/$Organisation/_apis/projects/$($team.projectName)/teams/$($team.name)/members?api-version=5.1" | 
      select -ExpandProperty value | select -ExpandProperty Identity
}

$allTeamsMembers | where {$_.uniqueName -notlike 'vstfs:*'} | 
  select -Unique displayName,uniqueName | sort displayName
Dennis
  • 871
  • 9
  • 29