How to: Team Projects, Fields, and Picklists Mapping on Azure DevOps

  1. PowerShell script will receive the following parameters:
  • $PAT = Personal Access token to connect on Azure DevOps;
  • $Organization = Organization URL to list all Team Projects, Fields, and Pick Lists on Azure DevOps organization;
  • $Connstr = connection string to Azure SQL Database that stores the report information. To create this report, it’s necessary to create previously a Azure SQL Server and Database and run a script below:
$AzureDevOpsAuthenicationHeader = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($PAT)")) }$UriOrganization = "https://dev.azure.com/$($Organization)/"$uriProject = $UriOrganization + "_apis/projects?`$top=500"$ProjectsResult = Invoke-RestMethod -Uri $uriProject -Method get -Headers $AzureDevOpsAuthenicationHeaderForeach ($project in $ProjectsResult.value)
{
Write-Host $project.name
}
$uriProjectPickList = $UriOrganization + "$($project.id)/_apis/wit/fields?api-version=6.0"    $ProjectsPickListResult = Invoke-RestMethod -Uri $uriProjectPickList -Method get -Headers $AzureDevOpsAuthenicationHeader    $ProjectsPickListResult = $ProjectsPickListResult.value | where-object {$_.isPicklist -eq $true}
$uriPickList = $UriOrganization + "_apis/work/processes/lists/$($fieldPickList.picklistId)?api-version=6.0-preview.1"        $PickListResult = Invoke-RestMethod -Uri $uriPickList -Method get -Headers $AzureDevOpsAuthenicationHeader        $items = $PickListResult.items        
$items = "$items".Replace(" ","`r`n")
  • Team Project (1) = Filter report using Team Project field;
  • Field Reference Name (2) = Filter report using Field Reference Name field;
  • Report information (3) = List all information about Team Projects, Fields, Data Type, and Allowed Values

--

--

--

Tech Solution Architect Manager na Accenture

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Plans for BERITH NFT? — Berith NFT Introduce (2)

Secure MongoDB on Ubuntu 18.04

What they publish: This women’s site is primarily, but too

{UPDATE} Aktiv!

Leetcode 1451: Rearrange Words in a Sentence

AWS: Setup Client VPN and DNS host mapping for the VPC Access

RNG vs. VRF — The Importance Of True Randomness In Applications

Member of the Band — Gorilla Rolando Lázcares

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
Vinicius Moura

Vinicius Moura

Tech Solution Architect Manager na Accenture

More from Medium

How to: Including a bunch of Work Items on Azure DevOps

Azure Sphere

How to extend an Azure DevOps YAML Pipeline Template

Create Azure Purview using Bicep