Forum Discussion

LainRobertson's avatar
LainRobertson
Silver Contributor
Aug 18, 2025

Bug: Invoke-MgGraphRequest not respecting ErrorAction.

Hi folks,

 

This is a brief callout that Invoke-MgGraphRequest is not currently respecting the ErrorAction parameter. Rather, it's hardwired to throwing an exception as if ErrorAction:Stop had been provided.

 

If you're like me and typically use ErrorAction:Stop in a try/catch block then you won't be impacted, but if use another value like Continue (the default) or SilentlyContinue, you may find this breaks your automation.

Example

 

Hopefully this is addressed in a future version of the Microsoft.Graph.Authentication module.

 

Cheers,

Lain

No RepliesBe the first to reply

Resources