Intune Dashboards: troubleshoot "TooManyRequests" API error in large environments

In deployments with large numbers of Intune-enrolled devices and managed policies (more than 1000 managed policies, with more than 1000 devices managed by a single policy), Nerdio Manager may encounter the Graph API TooManyRequests error when fetching data for the Policy Reports (Endpoints > Policy Reports) and/or Performance Reports (Endpoints > Performance Reports) dashboards.

Note

  • In the Policy Reports dashboard, the TooManyRequests error message is displayed directly in impacted reports after a failure to refresh the policy device statuses cache.

  • For Performance Reports, you can confirm if the error has occurred as follows:

    1. Navigate to System > Audit > Console Connect.

    2. Select Filter.

    3. In the Filter by types dropdown, select Collect User Experience History.

    4. Select OK.

    5. View the log details to ascertain whether the TooManyRequests error message is present.

To mitigate these issues, in the 7.6 and 7.7 releases of Nerdio Manager we have introduced some additional app service settings and recommendations for configuration changes based on the size of the environment.

Policy Reports dashboard errors

To prevent TooManyRequests errors for the Policy Reports dashboard in large environments, we recommend that you modify the policy cache configuration.

To change the Intune policy cache configuration in large environments:

Increase the Advanced App Service configuration settingFeatures:IntuneCache:PolicyDeviceStatusCacheLifetimeMinutes from its default of 180 by half an hour (30 minutes) for every 150 policies over and above 1000 (or part thereof) managed in your tenant.

For example, if you have 1500 managed policies in your tenant, Features:IntuneCache:PolicyDeviceStatusCacheLifetimeMinutes should be set at 180 + (4 x 30) = 300.

All Devices page throttling

In environments with a large number of Intune-enrolled devices, Nerdio Manager can encounter Graph API throttling when it loads the All Devices page. To reduce the number of requests, you can show cached device records on the page.

To show cached devices on the All Devices page:
  1. In the Azure portal, open the App Service for your Nerdio Manager deployment, and then navigate to Settings > Environment variables > App settings.

  2. Create the setting Features:IntuneCache:DisplayCachedDevices with a value of True.

  3. Optionally, create the setting Features:IntuneCache:DevicesLifetimeMinutes to change how long cached records remain valid. The default is 30 minutes. For environments with more than 50,000 devices, increase the value by 30 minutes if you continue to see throttling. Supported values are from 5 to 1440 minutes.

For details of both settings, see Advanced App Service configurations.

Note

Newly enrolled devices appear on the All Devices page after the cache refreshes. By default, this takes up to 30 minutes. When cached devices are shown, the page displays the cache status and a button to force a reload.

In tenants with more than 5,000 devices, Nerdio Manager loads the All Devices list from a Graph exported report instead of paginated requests, which reduces throttling. Smaller tenants continue to use the existing method.

Performance Reports dashboard errors

If the logs indicate that the Collect User Experience History task is returning TooManyRequests errors, we recommend that you modify the number of results returned per query and the query interval, by creating Advanced App Service settings with the following key-value pairs:

To change the number of results per query and the query interval for User Experience History:
  • Create the setting IntuneUxHistory:DataCollectionIntervalInMinutes with a value of 1440. (The default value is 720.)

If issues persist, you can fully disable Intune User Experience reporting by creating the setting IntuneUxHistory:Enabled with the value False.

Advanced Troubleshooting

If the above measures don't fix the issue, you can attempt the following additional measures under the supervision of a Nerdio customer support agent.

Caution

These changes should only be applied under the direct supervision of the Nerdio Support team. Please raise a support ticket and wait for assistance before implementing any of the changes described in this section.

Exclude persistently problematic policies (Policy Reports errors only)

If modifying Features:IntuneCache:PolicyDeviceStatusCacheLifetimeMinutes fails to resolve TooManyRequests errors, you can manually exclude any policies that may cause persistent processing errors.

To permanently exclude problematic policies:
  1. In the Azure portal, add the app service settingFeatures:IntuneCache:PolicyDeviceStatusCacheIgnoreList to your Nerdio Manager application.

  2. Add the Device Default Compliance policy ID "c0f4911a-7ce6-4804-8563-677a2665d379" to the app service setting value field.

    Caution

    The indicated quotation marks must be included in the string.

  3. Add any further problematic policies as comma separated values in the following format:

    Caution

    These are examples only; don't add these exact policy IDs!

    "c0f4911a-7ce6-4804-8563-677a2665d379, b0f4911a-7ce6-4804-8563-677a2665d378"
  4. Review the error report in the Nerdio Manager log to discover any additional problematic policy IDs, and repeat the step above to add them to the exclude list.

    Note

    Nerdio Manager no longer attempts to refresh cached data for policies added to this list. Data for these policies are either not displayed in the dashboards or displayed data may be out-of-date.

Increase the global timeout for Graph API calls (all errors)

Modifying the global timeout value for background API calls to Microsoft Graph provides a margin for error in very large environments where API calls may exceed those permitted by the platform.

Caution

This setting impacts all Graph API calls, not only those related to Intune dashboards. Modifying it may impact performance of other Nerdio Manager features that query the Graph API.

To increase the global timeout value:
  1. In the Azure portal, add the app service settingFeature:HttpOption:HttpClientTimeout:Graph:Background to your Nerdio Manager application.

  2. If the Nerdio Support team advises you to do so after reviewing application logs, increase the value for this setting from the default of 120 to 300.

Was this article helpful?

0 out of 0 found this helpful
Have more questions? Submit a request

Comments (0 comments)

Please sign in to leave a comment.