M365DSC.mgx

2.0.1

Resilient companion for Microsoft.Graph PowerShell. Adds retry, circuit breaker, rate limiting, streaming pagination, batching, and fan-out to any Graph API endpoint.

Minimum PowerShell version

7.6

Installation Options

Copy and Paste the following command to install this package using PowerShellGet More Info

Install-Module -Name M365DSC.mgx

Copy and Paste the following command to install this package using Microsoft.PowerShell.PSResourceGet More Info

Install-PSResource -Name M365DSC.mgx

You can deploy this package directly to Azure Automation. Note that deploying packages with dependencies will deploy all the dependencies to Azure Automation. Learn More

Manually download the .nupkg file to your system's default download location. Note that the file won't be unpacked, and won't include any dependencies. Learn More

Owners

Copyright

(c) 2026 Thomas Maillo Grome, (c) 2026 Fabien Tschanz. All rights reserved.

Package Details

Author(s)

  • Thomas Maillo Grome Fabien Tschanz

Tags

Microsoft Graph MicrosoftGraph API Azure EntraID Resilience PowerShell Polly Retry RateLimit Batch Delta Throttling Pagination

Cmdlets

Invoke-MgxRequest Invoke-MgxBatchRequest Export-MgxCollection Expand-MgxRelation Set-MgxOption Get-MgxOption Enable-MgxResilience Disable-MgxResilience Get-MgxResilience Get-MgxTelemetry Sync-MgxDelta

PSEditions

Core

Dependencies

Release Notes

v2.0.1
- Fixed an issue where Mgx cmdlets kept using the credentials of the first Connect-MgGraph call in a session. The cached HTTP client was keyed on tenant id alone, so reconnecting to the same tenant with a different application, certificate, account, or scope set silently reused the previous identity and kept returning Forbidden. It is now keyed on the whole auth context and rebuilt as soon as that changes.
- Fixed an issue where Enable-MgxResilience's wrapper around the Microsoft.Graph SDK client stayed bound to the pre-reconnect client. Resilience is now re-injected automatically when the identity changes.
- The auth context is read from GraphSession directly instead of invoking Get-MgContext on every request; Get-MgContext remains the fallback.
- Fixed an issue where a single throttling episode slowed Invoke-MgxBatchRequest for the rest of the session. The halved write pacing rate now recovers - clean chunks raise it, and five minutes without throttling restores the configured rate.
- Fixed an issue where Set-MgxOption -TotalTimeoutSeconds did not reach the HTTP client, whose Timeout is fixed once the first request has been sent. The client is now rebuilt when the value changes.
- Fixed an issue where the internal type cache was never invalidated, so re-importing Microsoft.Graph.Authentication left Mgx resolving GraphSession to the previous assembly's type. The cache is now dropped whenever an assembly loads.

FileList

Version History

Version Downloads Last updated
2.0.1 (current version) 5 8/8/2026
2.0.0 6 8/5/2026