# Check Device Compliance

### Description

This runbook retrieves the compliance status of a managed device from Microsoft Intune. In simple mode it shows the overall compliance state and lists any non-compliant policies. In detailed mode it additionally shows which specific settings are failing and the reason for each failure. Optionally, a report with the full compliance details can be sent via email.

### Location

Device → General → Check Device Compliance

**Full Runbook name**

rjgit-device\_general\_check-device-compliance

### Permissions

#### Application permissions

* **Type**: Microsoft Graph
  * Device.Read.All
  * DeviceManagementManagedDevices.Read.All
  * Organization.Read.All

### Parameters

#### DeviceId

The Entra ID device ID of the target device. Passed automatically by the RealmJoin platform.

| Property      | Value  |
| ------------- | ------ |
| Required      | true   |
| Default Value |        |
| Type          | String |

#### DetailedOutput

Select "Simple" (final value: $false) to show only the overall compliance state and non-compliant policy names. Select "Detailed" (final value: $true) to additionally show which specific settings are failing and the reason for each failure.

| Property      | Value   |
| ------------- | ------- |
| Required      | false   |
| Default Value | False   |
| Type          | Boolean |

#### EmailTo

Optional - if specified, a compliance report will be sent to the provided email address(es). Can be a single address or multiple comma-separated addresses.

| Property      | Value  |
| ------------- | ------ |
| Required      | false  |
| Default Value |        |
| Type          | String |

#### EmailFrom

The sender email address. This needs to be configured in the runbook customization.

| Property      | Value  |
| ------------- | ------ |
| Required      | false  |
| Default Value |        |
| Type          | String |

[Back to Runbook Reference overview](/automation/runbooks/runbook-references.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.realmjoin.com/automation/runbooks/runbook-references/device/general/check-device-compliance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
