How do I get all the URLs for my repos in Azure DevOps?


Use the Azure DevOps CLI extension

This is a sample PowerShell script

param( [string]$Organization )

$orgUrl = "$Organization"

# Ensure  signed in to Azure
$AccountInfo = az account show 2>&1
try {
    $AccountInfo = $AccountInfo | ConvertFrom-Json -ErrorAction Stop
catch {
    az login --allow-no-subscriptions

$DevOpsExtension = az extension list --query '[?name == ''azure-devops''].name' -o tsv
if ($null -eq $DevOpsExtension) {
    $null = az extension add --name 'azure-devops'

$Projects = az devops project list --organization $orgUrl --query 'value[].name' -o tsv
foreach ($Proj in $Projects) {
    $Repos = az repos list --organization $orgUrl --project $Proj | ConvertFrom-Json
    foreach ($Repo in $Repos) {
        Write-Output $Repo.webUrl

Here is a sample showing output.

PS C:\Dev\ado-api> & .\getRepos.ps1


Thanks to Simon Wahlin for the post