Namespace: microsoft.graph
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Not yet documented
This API is available in the following national cloud deployments.
Global service |
US Government L4 |
US Government L5 (DOD) |
China operated by 21Vianet |
✅ |
✅ |
✅ |
✅ |
Permissions
One of the following permissions is required to call this API. To learn more, including how to choose permissions, see Permissions.
Permission type |
Permissions (from least to most privileged) |
Delegated (work or school account) |
DeviceManagementConfiguration.Read.All, DeviceManagementConfiguration.ReadWrite.All, DeviceManagementApps.Read.All, DeviceManagementApps.ReadWrite.All, DeviceManagementManagedDevices.Read.All, DeviceManagementManagedDevices.ReadWrite.All |
Delegated (personal Microsoft account) |
Not supported. |
Application |
DeviceManagementConfiguration.Read.All, DeviceManagementConfiguration.ReadWrite.All, DeviceManagementApps.Read.All, DeviceManagementApps.ReadWrite.All, DeviceManagementManagedDevices.Read.All, DeviceManagementManagedDevices.ReadWrite.All |
HTTP Request
POST /deviceManagement/reports/getCachedReport
Request body
In the request body, supply JSON representation of the parameters.
The following table shows the parameters that can be used with this action.
Property |
Type |
Description |
id |
String |
Not yet documented |
select |
String collection |
Not yet documented |
search |
String |
Not yet documented |
groupBy |
String collection |
Not yet documented |
orderBy |
String collection |
Not yet documented |
skip |
Int32 |
Not yet documented |
top |
Int32 |
Not yet documented |
Response
If successful, this action returns a 200 OK
response code and a Stream in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/v1.0/deviceManagement/reports/getCachedReport
Content-type: application/json
Content-length: 209
{
"id": "Id value",
"select": [
"Select value"
],
"search": "Search value",
"groupBy": [
"Group By value"
],
"orderBy": [
"Order By value"
],
"skip": 4,
"top": 3
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.DeviceManagement.Reports.GetCachedReport;
var requestBody = new GetCachedReportPostRequestBody
{
Id = "Id value",
Select = new List<string>
{
"Select value",
},
Search = "Search value",
GroupBy = new List<string>
{
"Group By value",
},
OrderBy = new List<string>
{
"Order By value",
},
Skip = 4,
Top = 3,
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
await graphClient.DeviceManagement.Reports.GetCachedReport.PostAsync(requestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
mgc device-management reports get-cached-report post --body '{\
"id": "Id value",\
"select": [\
"Select value"\
],\
"search": "Search value",\
"groupBy": [\
"Group By value"\
],\
"orderBy": [\
"Order By value"\
],\
"skip": 4,\
"top": 3\
}\
'
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest major version. Current major version is $v1.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-sdk-go"
graphdevicemanagement "github.com/microsoftgraph/msgraph-sdk-go/devicemanagement"
//other-imports
)
requestBody := graphdevicemanagement.NewGetCachedReportPostRequestBody()
id := "Id value"
requestBody.SetId(&id)
select := []string {
"Select value",
}
requestBody.SetSelect(select)
search := "Search value"
requestBody.SetSearch(&search)
groupBy := []string {
"Group By value",
}
requestBody.SetGroupBy(groupBy)
orderBy := []string {
"Order By value",
}
requestBody.SetOrderBy(orderBy)
skip := int32(4)
requestBody.SetSkip(&skip)
top := int32(3)
requestBody.SetTop(&top)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
graphClient.DeviceManagement().Reports().GetCachedReport().Post(context.Background(), requestBody, nil)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.devicemanagement.reports.getcachedreport.GetCachedReportPostRequestBody getCachedReportPostRequestBody = new com.microsoft.graph.devicemanagement.reports.getcachedreport.GetCachedReportPostRequestBody();
getCachedReportPostRequestBody.setId("Id value");
LinkedList<String> select = new LinkedList<String>();
select.add("Select value");
getCachedReportPostRequestBody.setSelect(select);
getCachedReportPostRequestBody.setSearch("Search value");
LinkedList<String> groupBy = new LinkedList<String>();
groupBy.add("Group By value");
getCachedReportPostRequestBody.setGroupBy(groupBy);
LinkedList<String> orderBy = new LinkedList<String>();
orderBy.add("Order By value");
getCachedReportPostRequestBody.setOrderBy(orderBy);
getCachedReportPostRequestBody.setSkip(4);
getCachedReportPostRequestBody.setTop(3);
graphClient.deviceManagement().reports().getCachedReport().post(getCachedReportPostRequestBody);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
const options = {
authProvider,
};
const client = Client.init(options);
const stream = {
id: 'Id value',
select: [
'Select value'
],
search: 'Search value',
groupBy: [
'Group By value'
],
orderBy: [
'Order By value'
],
skip: 4,
top: 3
};
await client.api('/deviceManagement/reports/getCachedReport')
.post(stream);
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\DeviceManagement\Reports\GetCachedReport\GetCachedReportPostRequestBody;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GetCachedReportPostRequestBody();
$requestBody->setId('Id value');
$requestBody->setSelect(['Select value', ]);
$requestBody->setSearch('Search value');
$requestBody->setGroupBy(['Group By value', ]);
$requestBody->setOrderBy(['Order By value', ]);
$requestBody->setSkip(4);
$requestBody->setTop(3);
$graphServiceClient->deviceManagement()->reports()->getCachedReport()->post($requestBody)->wait();
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Import-Module Microsoft.Graph.Reports
$params = @{
id = "Id value"
select = @(
"Select value"
)
search = "Search value"
groupBy = @(
"Group By value"
)
orderBy = @(
"Order By value"
)
skip = 4
top = 3
}
Get-MgDeviceManagementReportCachedReport -BodyParameter $params
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph import GraphServiceClient
from msgraph.generated.devicemanagement.reports.get_cached_report.get_cached_report_post_request_body import GetCachedReportPostRequestBody
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GetCachedReportPostRequestBody(
id = "Id value",
select = [
"Select value",
],
search = "Search value",
group_by = [
"Group By value",
],
order_by = [
"Order By value",
],
skip = 4,
top = 3,
)
await graph_client.device_management.reports.get_cached_report.post(request_body)
For details about how to add the SDK to your project and create an authProvider instance, see the SDK documentation.
Response
Here is an example of the response. Note: The response object shown here may be truncated for brevity. All of the properties will be returned from an actual call.
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 79
{
"value": "Z2V0Q2FjaGVkUmVwb3J0IEludHVuZSBEb2MgU2FtcGxlIDc5MjIxODQ3OA=="
}