Microsoft Endpoint Configuration Management Device Compliance Triage

Version 1.0.0

Inspect a managed device and branch on its compliance state to either sync or retire it.

1 workflow 1 source API 1 provider
View Spec View on GitHub ComplianceConfiguration ManagementDevice ManagementEndpoint ManagementMobile Device ManagementPatch ManagementSoftware DeploymentArazzoWorkflows

Provider

microsoft-endpoint-configuration-management

Workflows

device-compliance-triage
Read a managed device and remediate based on its compliance state.
Reads the managedDevice by id, branches on the complianceState property, and either triggers a device sync for compliant devices or retires non-compliant devices.
3 steps inputs: accessToken, managedDeviceId outputs: complianceState, deviceName, retireStatus, syncStatus
1
getDevice
getManagedDevice
Read the managed device to obtain its current compliance state.
2
syncDevice
syncManagedDevice
Trigger a sync for a compliant device to refresh its policy state.
3
retireDevice
retireManagedDevice
Retire a non-compliant device, removing corporate data while leaving personal data intact.

Source API Descriptions

Arazzo Workflow Specification

microsoft-endpoint-configuration-management-device-compliance-triage-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Endpoint Configuration Management Device Compliance Triage
  summary: Inspect a managed device and branch on its compliance state to either sync or retire it.
  description: >-
    A remediation flow for a single Intune managed device. The workflow reads
    the device, then branches on its complianceState: a compliant device is
    given a sync to refresh its policy state, while a non-compliant device is
    retired to remove corporate data. Every step spells out its request inline
    so the flow can be read and executed without opening the underlying
    OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: intuneGraphApi
  url: ../openapi/microsoft-endpoint-configuration-management-intune-graph-api-openapi.yml
  type: openapi
workflows:
- workflowId: device-compliance-triage
  summary: Read a managed device and remediate based on its compliance state.
  description: >-
    Reads the managedDevice by id, branches on the complianceState property,
    and either triggers a device sync for compliant devices or retires
    non-compliant devices.
  inputs:
    type: object
    required:
    - managedDeviceId
    properties:
      accessToken:
        type: string
        description: OAuth 2.0 bearer token for Microsoft Graph (DeviceManagementManagedDevices.ReadWrite.All).
      managedDeviceId:
        type: string
        description: The unique identifier of the managed device to triage.
  steps:
  - stepId: getDevice
    description: Read the managed device to obtain its current compliance state.
    operationId: getManagedDevice
    parameters:
    - name: managedDeviceId
      in: path
      value: $inputs.managedDeviceId
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      complianceState: $response.body#/complianceState
      deviceName: $response.body#/deviceName
    onSuccess:
    - name: deviceCompliant
      type: goto
      stepId: syncDevice
      criteria:
      - context: $response.body
        condition: $.complianceState == "compliant"
        type: jsonpath
    - name: deviceNonCompliant
      type: goto
      stepId: retireDevice
      criteria:
      - context: $response.body
        condition: $.complianceState != "compliant"
        type: jsonpath
  - stepId: syncDevice
    description: Trigger a sync for a compliant device to refresh its policy state.
    operationId: syncManagedDevice
    parameters:
    - name: managedDeviceId
      in: path
      value: $inputs.managedDeviceId
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      syncStatus: $statusCode
    onSuccess:
    - name: doneSync
      type: end
  - stepId: retireDevice
    description: Retire a non-compliant device, removing corporate data while leaving personal data intact.
    operationId: retireManagedDevice
    parameters:
    - name: managedDeviceId
      in: path
      value: $inputs.managedDeviceId
    - name: Authorization
      in: header
      value: "Bearer $inputs.accessToken"
    successCriteria:
    - condition: $statusCode == 204
    outputs:
      retireStatus: $statusCode
  outputs:
    deviceName: $steps.getDevice.outputs.deviceName
    complianceState: $steps.getDevice.outputs.complianceState
    syncStatus: $steps.syncDevice.outputs.syncStatus
    retireStatus: $steps.retireDevice.outputs.retireStatus