## TL;DR
The agent is probably stopping at the first page or reusing a stale skip token. Follow the next-link from every response until it is absent, accumulate all pages, and compare the total against the expected count before reporting.

## Steps
1. Change the fetch loop to continue while a next-link is present in the response.
   Expected: The loop no longer exits after page one.
2. Accumulate results across pages instead of overwriting the list each iteration.
   Expected: The final list grows with every page.
3. Compare the accumulated count with the tenant's known device count or a top-count query.
   Expected: The counts match.
4. Run the enumeration twice and confirm identical totals.
   Expected: No pages are dropped on repeat runs.

## When to use
- Fleet reports from the agent are smaller than the Intune console shows
- Compliance sweeps miss devices the console flags
- The agent uses Graph list calls with default page sizes

## When not to use
- The query returns fewer than 100 items (single page anyway)
- The agent uses delta queries (different continuation mechanism)
- The count mismatch comes from filtering, not pagination

## Why this happens
Graph returns paged results with a next-link the caller must follow; a loop that breaks early, overwrites instead of appending, or drops the skip token silently returns a partial fleet. The bug hides because small tenants fit on one page.

## Edge cases
- Throttling can return a retry response mid-pagination; the loop must resume, not restart.
- Filter changes between pages can shift results; keep the query constant across the loop.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_zQQSYIoGeo_lpoEQItIkQw
