It is possible but its not particularly nice.
The project tags are actually just project properties and these can be accessed via Azure DevOps Services REST API1.
They have a property 'path' of:
/Microsoft.TeamFoundation.Project.Tag.YourTag
YourTag is tag as it appears, e.g. Owned By: Sebastian Rogers, and yes it can use punctuation and spaces.
So to get all the tags on a project you need to use the REST API directly and interpret the results:
curl -u USERNAME:PAT https://dev.azure.com/ORGANISATION_NAME/_apis/projects/PROJECT_ID/properties
where
- USERNAME, your username
- PAT, a valid PAT Token in Azure DevOps
- ORGANISATION_NAME, the name of your Azure DevOps organisation
- PROJECT_ID, the id associated with the desired Azure DEVOps project
this will give you something like this
{
"count": 15,
"value": [...
{
"name": "Microsoft.TeamFoundation.Project.Tag.CLI: Added",
"value": "true"
}
]
}
you can set tags as follows:
curl -u USERNAME:PAT -X PATCH -H 'Content-Type: application/json-patch+json' https://dev.azure.com/ORGANISATION_NAME/_apis/projects/PROJECT_ID/properties?api-version=7.1-preview.1 -d '[{"op": "add", "path": "/Microsoft.TeamFoundation.Project.Tag.CLI: Added", "value": "true"}]'
you can also remove them
curl -u USERNAME:PAT -X PATCH -H 'Content-Type: application/json-patch+json' https://dev.azure.com/ORGANISATION_NAME/_apis/projects/PROJECT_ID/properties?api-version=7.1-preview.1 -d '[{"op": "remove", "path": "/Microsoft.TeamFoundation.Project.Tag.CLI: Added"}]'
So the tools exist to do it