Create deviceManagementReportSchedule
Namespace: microsoft.graph
Important: Microsoft Graph APIs under the /beta version are subject to change; production use is not supported.
Note: The Microsoft Graph API for Intune requires an active Intune license for the tenant.
Create a new deviceManagementReportSchedule object.
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.ReadWrite.All, DeviceManagementApps.ReadWrite.All, DeviceManagementManagedDevices.ReadWrite.All |
Delegated (personal Microsoft account) | Not supported. |
Application | DeviceManagementConfiguration.ReadWrite.All, DeviceManagementApps.ReadWrite.All, DeviceManagementManagedDevices.ReadWrite.All |
HTTP Request
POST /deviceManagement/reports/reportSchedules
Request headers
Header | Value |
---|---|
Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Accept | application/json |
Request body
In the request body, supply a JSON representation for the deviceManagementReportSchedule object.
The following table shows the properties that are required when you create the deviceManagementReportSchedule.
Property | Type | Description |
---|---|---|
id | String | Unique identifier for this entity |
reportScheduleName | String | Name of the schedule |
subject | String | Subject of the scheduled reports that are delivered |
emails | String collection | Emails to which the scheduled reports are delivered |
recurrence | deviceManagementScheduledReportRecurrence | Frequency of scheduled report delivery. Possible values are: none , daily , weekly , monthly . |
startDateTime | DateTimeOffset | Time that the delivery of the scheduled reports starts |
endDateTime | DateTimeOffset | Time that the delivery of the scheduled reports ends |
userId | String | The Id of the User who created the report |
reportName | String | Name of the report |
filter | String | Filters applied on the report |
select | String collection | Columns selected from the report |
orderBy | String collection | Ordering of columns in the report |
format | deviceManagementReportFileFormat | Format of the scheduled report. Possible values are: csv , pdf . |
Response
If successful, this method returns a 201 Created
response code and a deviceManagementReportSchedule object in the response body.
Example
Request
Here is an example of the request.
POST https://graph.microsoft.com/beta/deviceManagement/reports/reportSchedules
Content-type: application/json
Content-length: 539
{
"@odata.type": "#microsoft.graph.deviceManagementReportSchedule",
"reportScheduleName": "Report Schedule Name value",
"subject": "Subject value",
"emails": [
"Emails value"
],
"recurrence": "daily",
"startDateTime": "2016-12-31T23:58:46.7156189-08:00",
"endDateTime": "2017-01-01T00:03:30.9241974-08:00",
"userId": "User Id value",
"reportName": "Report Name value",
"filter": "Filter value",
"select": [
"Select value"
],
"orderBy": [
"Order By value"
],
"format": "pdf"
}
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 201 Created
Content-Type: application/json
Content-Length: 588
{
"@odata.type": "#microsoft.graph.deviceManagementReportSchedule",
"id": "00bb9785-9785-00bb-8597-bb008597bb00",
"reportScheduleName": "Report Schedule Name value",
"subject": "Subject value",
"emails": [
"Emails value"
],
"recurrence": "daily",
"startDateTime": "2016-12-31T23:58:46.7156189-08:00",
"endDateTime": "2017-01-01T00:03:30.9241974-08:00",
"userId": "User Id value",
"reportName": "Report Name value",
"filter": "Filter value",
"select": [
"Select value"
],
"orderBy": [
"Order By value"
],
"format": "pdf"
}