Edit

Share via


deviceComplianceScriptDeviceState 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 compliance script.

Methods

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

Properties

Property Type Description
id String Key of the device compliance script device state entity. This property is read-only.
detectionState runState Detection state from the lastest device compliance script execution. Possible values are: unknown, success, fail, scriptError, pending, notApplicable.
lastStateUpdateDateTime DateTimeOffset The last timestamp of when the device compliance script executed
expectedStateUpdateDateTime DateTimeOffset The next timestamp of when the device compliance script is expected to execute
lastSyncDateTime DateTimeOffset The last time that Intune Managment Extension synced with Intune
scriptOutput String Output of the detection script
scriptError String Error from the detection script

Relationships

Relationship Type Description
managedDevice managedDevice The managed device on which the device compliance script executed

JSON Representation

Here is a JSON representation of the resource.

{
  "@odata.type": "#microsoft.graph.deviceComplianceScriptDeviceState",
  "id": "String (identifier)",
  "detectionState": "String",
  "lastStateUpdateDateTime": "String (timestamp)",
  "expectedStateUpdateDateTime": "String (timestamp)",
  "lastSyncDateTime": "String (timestamp)",
  "scriptOutput": "String",
  "scriptError": "String"
}