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.