Update remoteActionAudit

Note: Using the Microsoft Graph APIs to configure Intune controls and policies still requires that the Intune service is correctly licensed by the customer.

Update the properties of a remoteActionAudit object.

Prerequisites

One of the following permission scopes is required to execute this API:

DeviceManagementManagedDevices.ReadWrite.All

HTTP Request

PATCH /deviceManagement/remoteActionAudits/{remoteActionAuditId}

Request headers

Header Value
Authorization Bearer <token> Required.
Accept application/json

Request body

In the request body, supply a JSON representation of a remoteActionAudit object. The following table shows the properties that are required when you create a remoteActionAudit.

Property Type Description
id String Report Id.
deviceDisplayName String Intune device name.
userName String [deprecated] Please use InitiatedByUserPrincipalName instead.
initiatedByUserPrincipalName String User who initiated the device action, format is UPN.
action String The action name. Possible values are: unknown, factoryReset, removeCompanyData, resetPasscode, remoteLock, enableLostMode, disableLostMode, locateDevice, rebootNow, recoverPasscode, cleanWindowsDevice, logoutSharedAppleDeviceActiveUser.
requestDateTime DateTimeOffset Time when the action was issued, given in UTC.
deviceOwnerUserPrincipalName String Upn of the device owner.
deviceIMEI String IMEI of the device.
actionState String Action state. Possible values are: none, pending, canceled, active, done, failed, notSupported.

Response

If successful, this method returns a 200 OK response code and an updated remoteActionAudit object in the response body.

Example

Request

Here is an example of the request.

PATCH https://graph.microsoft.com/beta/deviceManagement/remoteActionAudits/{remoteActionAuditId}
Content-type: application/json
Content-length: 399

{
  "deviceDisplayName": "Device Display Name value",
  "userName": "User Name value",
  "initiatedByUserPrincipalName": "Initiated By User Principal Name value",
  "action": "factoryReset",
  "requestDateTime": "2017-01-01T00:03:07.1589002-08:00",
  "deviceOwnerUserPrincipalName": "Device Owner User Principal Name value",
  "deviceIMEI": "Device IMEI value",
  "actionState": "pending"
}

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: 504

{
  "@odata.type": "#microsoft.graph.remoteActionAudit",
  "id": "477f8d24-8d24-477f-248d-7f47248d7f47",
  "deviceDisplayName": "Device Display Name value",
  "userName": "User Name value",
  "initiatedByUserPrincipalName": "Initiated By User Principal Name value",
  "action": "factoryReset",
  "requestDateTime": "2017-01-01T00:03:07.1589002-08:00",
  "deviceOwnerUserPrincipalName": "Device Owner User Principal Name value",
  "deviceIMEI": "Device IMEI value",
  "actionState": "pending"
}