Edit

Share via


deviceManagementScriptDeviceState resource type

Namespace: microsoft.graph

Important: APIs under the /beta version in Microsoft Graph are subject to change which could break your applications. While Intune /beta APIs are supported by Microsoft, you should use these at your own discretion. In general, /beta APIs are not recommended for use in production applications. To determine whether an API is available in v1.0, use the Version selector.

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"
}