Forum Discussion
itsmguy20
Apr 23, 2025Copper Contributor
How to delete pipeline tags with special characters?
I want to delete specific tags attached to Azure pipeline builds, for example "hello: world". I've come to the conclusion that the ADO REST API endpoint for handling Tag deletions cannot parse specia...
Kidd_Ip
Apr 26, 2025MVP
May consider Power Shell Invoke-RestMethod:
$url = "https://dev.azure.com/organisation/project/_apis/build/builds/1234567/tags?api-version=6.0"
$headers = @{
"Authorization" = "Bearer YOUR_PERSONAL_ACCESS_TOKEN"
"Content-Type" = "application/json"
}
$body = @{
"tags" = @("tag1", "tag2") # Include only the tags you want to keep
} | ConvertTo-Json -Depth 10
Invoke-RestMethod -Uri $url -Method Patch -Headers $headers -Body $body