Forum Discussion
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
2 Replies
- SchnittlauchIron Contributor
Hi Lain,
im not sure if this gets heard by microsoft.
You should report this bug at
BR Schnittlauch
- LainRobertsonSilver Contributor
Hi Schnittlauch​,
That's okay. I was only posting it for the community's benefit rather than for Microsoft's benefit.
Cheers,
Lain