Azure Boards Queries Truncate at 20,000 Items, With No Error

A query that quietly stops at 20,000 work items looks identical to a query that returned everything, until the count doesn't match what you expected.

The documented limit

Microsoft's own Azure DevOps limits reference lists query results at a hard cap of 20,000 items, and is explicit about what happens past that point: results are truncated at 20,000 items, no error is shown. Per Microsoft's own documented behavior, the query editor simply stops adding rows at 20,000 with no warning banner or partial-results notice.

Why this matters for an export

Any workflow reading its results from the Azure Boards query editor, whether that's a manual Excel export or a saved query someone checks periodically, inherits that same documented cutoff. A project with more than 20,000 work items matching a broad query, for example every item across a multi-year backlog, can lose rows off the end of the query with nothing in the output to indicate they're missing. The only way to notice is comparing the returned count against a separate count you trust, which most people don't think to do until numbers stop reconciling somewhere downstream.

How to keep a query under the cap

  • Scope by iteration, area path, or a date range instead of pulling an entire project's history in one query.
  • Split a broad query into several narrower saved queries and export each separately, the same shape Microsoft recommends for query timeouts.
  • Check the returned row count against the number of items you expect from the area or iteration before trusting an export as complete.

See exporting Azure Boards work items to Excel for the rest of a safe export, and giving each work item a different value in one bulk-edit pass if the reason you're exporting is to make a batch of changes.

Know exactly what got exported

Excel Import & Export for Azure Boards exports whatever a query or WIQL returns and reports the row count in the workbook, so you can compare it against the count you expect and catch a shortfall immediately, and the dry-run pass on the way back in reports create, update, skip, error, or warning for every row before anything writes.

See Excel Import & Export for Azure Boards