Welcome to the Microsoft Q&A Platform! Thank you for asking your question here.
Unfortunately, you cannot use wildcards (*), partial matching, or "Starts with" operators on the Tags field in Azure DevOps queries.
While Azure DevOps supports trailing wildcards for long-text fields (like Title, Description, or History) using the Contains Words operator, the Tags field is evaluated differently. The Tags field only supports the Contains and Does Not Contain operators. When used on tags, Contains requires an exact match of the whole tag name, not a partial string or wildcard match.
Official Documentation Reference: According to the official Microsoft documentation on Query fields, operators, macros, and variables:
- Tags Field Operators: The supported operators for tags are limited to exact inclusion/exclusion (
Contains,Does Not Contain). - Wildcard Support (
*): Wildcards are only supported via theContains Wordsoperator, which is exclusively available for text fields indexed for full-text search (PlainText, HTML, History, and Title), not for the Tags array.
Workarounds to achieve your goal
Alternative 1: Add a custom text field and query with Contains.
When to use: You need pattern-like matching (for example match PPDependency-* across values) or more structured filtering/reporting.
Steps:
- Create an inherited process (if you don’t already use one) and open it from Organization settings → Process.
- For the Work Item Type(s) you need (User Story / Bug / Task), Add new field:
- Name:
PPDependency(orCategoryTag) - Type: Single line of text.
- Add the field to the work item Layout so users can edit it.
- Name:
- Populate the field for existing/new work items (you can bulk-edit or script updates). Use structured values (e.g.,
PPDependency-service,PPDependency-db). - Query: use
Field = PPDependencyOperator = ContainsValue = PPDependency(orValue = PPDependency-to match the prefix). Because this is a text field you can useContains/Contains Wordssemantics appropriate to your needs.
Pros: Full control over naming and substring/prefix matching; easier to report on and export.
Cons: Requires process customization and (optionally) updating existing items.
Alternative 2 — Standardize on a base tag PPDependency and query by exact tag
When to use: you want to keep using tags (quick, no process change) and can standardize tag names across work items.
Steps:
- Agree on a canonical tag (example:
PPDependency). Educate the team to add this tag (and only append well-known suffixes if needed). - Apply the tag to relevant work items (use the Add tag UI or the REST API).
- Query: In Query Editor set
Field = Tags,Operator = Contains,Value = PPDependency. This finds items that include that exact tag token. (If you used sub-tags likePPDependency-service, those are different tokens — consider whether you need exact match or multiple clauses.)
Pros: No process customization; quick to adopt.
Cons: Requires strict tag naming discipline; Contains will match only the token you put — it won’t behave like a starts-with * wildcard across different token forms.
Please let me know if it was helpful or any other query.