/beta/deviceManagement/reports/cachedReportConfigurations returns 404 Not Found instead of an empty collection

Christian Neerup 0 Reputation points
2023-06-11T12:41:27.83+00:00

Hello everyone,

I have recently been trying to use some of the APIs for cached reports that are related to Microsoft Intune / Microsoft Endpoint Manager, and it seems that I cannot get some of them to work. To start with I'd like to ask about this API:

GET /beta/deviceManagement/reports/cachedReportConfigurations

Documented here: https://video2.skills-academy.com/en-us/graph/api/intune-reporting-devicemanagementcachedreportconfiguration-list?view=graph-rest-beta (only available in the beta version of the API)

This is supposed to return a deviceManagementCachedReportConfiguration resource type collection.

When I call that API I get the following JSON response body:

{
    "error": {
        "code": "ResourceNotFound",
        "message": "{  \"_version\": 3,  \"Message\": \"An error has occurred - Operation ID (for customer support): 00000000-0000-0000-0000-000000000000 - Activity ID: 686c1c9b-1e04-e1a7-35b8-e22f496b21ff - Url: https://fef.msub06.manage.microsoft.com/ReportingService/StatelessReportingFEService/deviceManagement/reports/cachedReportConfigurations?api-version=5021-09-01\",  \"CustomApiErrorPhrase\": \"\",  \"RetryAfter\": null,  \"ErrorSourceService\": \"\",  \"HttpHeaders\": \"{}\"}",
        "innerError": {
            "date": "2023-06-05T16:18:55",
            "request-id": "caacfee4-f4d1-4870-9528-90b7f779bd15",
            "client-request-id": "686c1c9b-1e04-e1a7-35b8-e22f496b21ff"
        }
    }
}

Reproduction

This result was gotten using the Graph Explorer, but can also be reproduced by using the Microsoft Graph SDK for .NET as follows:

using (GraphServiceClient client = new GraphServiceClient(clientCredentialsAuthProvider))
{
    var collection = await client.DeviceManagement.Reports.CachedReportConfigurations.GetAsync();
}

The above code uses Microsoft.Graph.Beta 5.29.0-preview. That code ends up throwing an ODataError, in which the error data contains the JSON response body I have given above.

Expected Result

I would expect this API call to return an empty collection if no cached report configurations exist, and not throw an ODataError. To me it seems like a developer needs to check up on if this API is working as intended or if it at all works.

To summarize

I hope that this question will lead to getting some more knowledge about how cached reports can be created and configured using the API. I need to know this because I am regularly creating Intune reports through the API, and would like to know if they get cached or not and which cache configuration they use, but I cannot seem to find any detailed/technical documentation on this.

Other API calls that relates to cached Intune reports which I will not ask about at this moment includes:

I hope that the answers that I get here will clue me in on why I have had issues using these APIs, it has been a while since I have tried to use the two APIs above, so I cannot say exactly what went wrong when calling them, but we might get to that another time.

I know that the APIs require the tenant to have an Intune license, which it has, and many other Intune related API calls work just fine.

Initially I had opened an issue on the Microsoft Graph Beta SDK for .NET, where after they had directed me to here.

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
11,235 questions
Microsoft Intune Reporting
Microsoft Intune Reporting
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Reporting: The process of giving an account of something that has been observed, heard, done, or investigated.
66 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,657 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Lu Dai-MSFT 28,366 Reputation points
    2023-06-12T06:02:05.5366667+00:00

    @Christian Neerup Thanks for posting in our Q&A.

    Based on my check, it may need "Request headers". However, when I get the request via DevTools, it shows a provisional headers warning. So, I can't get the Authorization.

    User's image

    User's image

    For such graph issue, it is more related develop scope. With Q&A limitation resource, it is suggested to create a premier support ticket to get more accurate help. Here is the support link:

    https://video2.skills-academy.com/en-us/mem/get-support#premier-and-unified-support-options

    Thanks for your understanding.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments