You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Get-MgDeviceManagementManagedDevice fails if parameters are set #1632
I am using Get-MgDeviceManagementManagedDevice to get the Intune info on all devices in our tenant.
If I run it like:
Get-MgDeviceManagementManagedDevice -All
It works just fine.
However, if I set any filter, like -Filter "OperatingSystem eq 'Windows'"
It fails with: "More than 3 retries encountered while sending the request."
This happens also if I use the -Property paramter and try to select specific properties.
By default, the command will retry a throttled request three times before failing. You can modify the max retry using Set-MgRequestContext -MaxRetry 5 to something > 3 to see if this resolves the issue.
Hello Peter. Thanks for the reply.
But if that is the case, then why is:
Get-MgDeviceManagementManagedDevice -All
working? Wouldn't that be throttled also?
Activity
peombwa commentedon Nov 15, 2022
Andrei Vida-Rațiu (@andreiv3103), the error is due to the service throttling your requests.
By default, the command will retry a throttled request three times before failing. You can modify the max retry using
Set-MgRequestContext -MaxRetry 5to something > 3 to see if this resolves the issue.If the issue persists, please open a support ticket/question at https://developer.microsoft.com/en-us/graph/support with the
request-idanddateof the failed request to get help from the workload owner. See https://learn.microsoft.com/en-us/powershell/microsoftgraph/troubleshooting?view=graph-powershell-1.0#using--debug.andreiv3103 commentedon Nov 15, 2022
Hello Peter. Thanks for the reply.
But if that is the case, then why is:
Get-MgDeviceManagementManagedDevice -All
working? Wouldn't that be throttled also?
peombwa commentedon Nov 15, 2022
That's a good question for the API owner. Service workloads throttle requests using different strategies. See https://learn.microsoft.com/en-us/graph/throttling-limits#identity-and-access-service-limits.
Opening a support ticket with the failing
request-idwill help in figuring out why requests containing$filterare being throttled.andreiv3103 commentedon Nov 15, 2022
Understood. Thanks a lot!