Forum Discussion
LainRobertson
Aug 18, 2025Silver Contributor
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...
Oct 31, 2025
Have you tried the Try-Catch method?
For example:
try {
Invoke-MgGraphRequest -Uri "https://graph.microsoft.com/beta/users/email address removed for privacy reasons" `
-Method GET `
-ErrorAction SilentlyContinue
Write-Host "Request continued"
} catch {
Write-Host "Caught exception: $_"
}
- LainRobertsonOct 31, 2025Silver Contributor
Yes, I mentioned that in the original post.
This wasn't a question from me but an FYI for the community's benefit.
Cheers,
Lain