Skip to main content

Pagination and Retries

List commands use shared pagination options where the Graph endpoint supports them.

teams chat list --page-size 25 --all-pages --output json

--page-size controls the first Graph request's $top value. --all-pages follows every returned @odata.nextLink until the result is complete.

Microsoft Graph rejects $top on three otherwise paginated endpoints. For teams channel list, teams chat members list and teams subscribe list (from v0.11.0; earlier versions failed with HTTP 400), the CLI therefore ignores --page-size and lets Graph choose the page size. --all-pages still follows @odata.nextLink for all three.

Without --all-pages, a list command returns one page and says whether it is complete: metadata.has_more is true when Graph has more, and metadata.next_link then holds Graph's @odata.nextLink. With --all-pages, has_more is false. Human and plain output print "More results available; use --all-pages" on stderr instead.

The Graph client retries HTTP 429 and HTTP 5xx with exponential backoff. It honors Retry-After in seconds or as an HTTP date, on 429 and on retried 5xx responses, capped at 300 seconds.

A write (POST) is retried only when Graph never received it: on 429, or when the connection could not be made. After a 5xx or a network failure once the request was sent, it fails with exit code 8 or 7 and a hint to check before re-sending, because Graph may already have posted the message. Read-only POSTs (search, presence get-batch) retry like reads.

For agents, add workflow-level backoff to avoid repeated fan-out into large tenants.