deviceManagementScriptDeviceState resource type

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.

Contains properties for device run state of the device management script.

Methods

Method Return Type Description
List deviceManagementScriptDeviceStates deviceManagementScriptDeviceState collection List properties and relationships of the deviceManagementScriptDeviceState objects.
Get deviceManagementScriptDeviceState deviceManagementScriptDeviceState Read properties and relationships of the deviceManagementScriptDeviceState object.
Create deviceManagementScriptDeviceState deviceManagementScriptDeviceState Create a new deviceManagementScriptDeviceState object.
Delete deviceManagementScriptDeviceState None Deletes a deviceManagementScriptDeviceState.
Update deviceManagementScriptDeviceState deviceManagementScriptDeviceState Update the properties of a deviceManagementScriptDeviceState object.

Properties

Property Type Description
id String Key of the device management script device state entity. This property is read-only.
runState runState State of latest run of the device management script. Possible values are: unknown, success, fail, scriptError, pending, notApplicable.
resultMessage String Details of execution output.
lastStateUpdateDateTime DateTimeOffset Latest time the device management script executes.
errorCode Int32 Error code corresponding to erroneous execution of the device management script.
errorDescription String Error description corresponding to erroneous execution of the device management script.

Relationships

Relationship Type Description
managedDevice managedDevice The managed devices that executes the device management script.

JSON Representation

Here is a JSON representation of the resource.

{
  "@odata.type": "#microsoft.graph.deviceManagementScriptDeviceState",
  "id": "String (identifier)",
  "runState": "String",
  "resultMessage": "String",
  "lastStateUpdateDateTime": "String (timestamp)",
  "errorCode": 1024,
  "errorDescription": "String"
}