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
itsmguy20
Apr 29, 2025Copper Contributor
This question has been resolved. I have included the solution on Stack-Overflow as this question took longer than expected to go through the review approval process.
Cross-posting solution here:
https://stackoverflow.com/questions/79588243/how-to-delete-pipeline-tags-with-special-characters