Skip to main content

SYNOPSIS

Wraps Invoke-MgGraphRequest with automatic retry on HTTP 429 (throttling).

SYNTAX

DESCRIPTION

Manual pagination loops over large tenants can be throttled by Graph. Without a retry, the catch block typically logs a warning and continues, silently returning incomplete results. This helper retries on 429, honoring the Retry-After header when present and otherwise backing off exponentially (capped at 60s). Any non-429 error is rethrown unchanged.

EXAMPLES

PARAMETERS

-Uri

The Graph request URI.

-Method

HTTP method (default GET).

-Body

Optional request body.

-MaxRetries

Maximum number of retry attempts on 429 (default 5).

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES