I am trying to get list of collection in from Azure DevOps Server. There is no API available to fetch the list of collections.
[tfs url]/_apis/projectCollections?$top=1000
I tried above API (PAT authorization)
To get all the collections which your account has access to, you can try the steps below.
$token = "{PAT}"
$token = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes(":$($token)"))
$url="{Server URL}/_apis/projectCollections?%24top=1000?api-version=7.1-preview.2"
$head = @{ Authorization =" Basic $token" }
$result = Invoke-RestMethod -Uri $url -Method GET -Headers $head
$result| ConvertTo-Json