Share via

Wild Cards in Azure DevOps Queries ????

Sheetal Barapatre 25 Reputation points
2026-03-11T09:34:52.1066667+00:00

How to use wild card in a query in Azure Devops Queries. I want to search for bugs having tags starting with 'PPDependency*'? How can i achieve this?

Azure DevOps

Answer accepted by question author
  1. Rakesh Mishra 7,780 Reputation points Microsoft External Staff Moderator
    2026-03-11T11:46:19.39+00:00

    Hi @Sheetal Barapatre,

    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 the Contains Words operator, 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:

    1. Create an inherited process (if you don’t already use one) and open it from Organization settings → Process.
    2. For the Work Item Type(s) you need (User Story / Bug / Task), Add new field:
      • Name: PPDependency (or CategoryTag)
      • Type: Single line of text.
      • Add the field to the work item Layout so users can edit it.
    3. Populate the field for existing/new work items (you can bulk-edit or script updates). Use structured values (e.g., PPDependency-service, PPDependency-db).
    4. Query: use Field = PPDependency Operator = Contains Value = PPDependency (or Value = PPDependency- to match the prefix). Because this is a text field you can use Contains / Contains Words semantics appropriate to your needs.
      User's image

    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:

    1. Agree on a canonical tag (example: PPDependency). Educate the team to add this tag (and only append well-known suffixes if needed).
    2. Apply the tag to relevant work items (use the Add tag UI or the REST API).
    3. 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 like PPDependency-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.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.