Skip to content

Get-MgDeviceManagementManagedDevice fails if parameters are set #1632

Closed

Description

Hello all

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.

Activity

  1. peombwa commented on Nov 15, 2022

    @peombwa
    Member

    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 5 to 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-id and date of 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.

  2. andreiv3103 commented on Nov 15, 2022

    @andreiv3103
    Author

    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?

  3. peombwa commented on Nov 15, 2022

    @peombwa
    Member

    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-id will help in figuring out why requests containing $filter are being throttled.

  4. andreiv3103 commented on Nov 15, 2022

    @andreiv3103
    Author

    Understood. Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions