# Export Non Compliant Devices

### Description

This runbook queries Intune for non-compliant and in-grace-period devices and retrieves detailed policy and setting compliance data. It can export the results to CSV with SAS (download) links.

### Location

Organization → General → Export Non Compliant Devices

**Full Runbook name**

rjgit-org\_general\_export-non-compliant-devices

### Permissions

#### Application permissions

* **Type**: Microsoft Graph
  * DeviceManagementConfiguration.Read.All

#### Permission notes

Azure IaaS: Access to create/manage Azure Storage resources if producing links

### Parameters

#### produceLinks

If set to true, uploads artifacts and produces SAS (download) links when storage settings are available.

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

#### ContainerName

Storage container name used for uploads.

| Property      | Value                            |
| ------------- | -------------------------------- |
| Required      | false                            |
| Default Value | rjrb-device-compliance-report-v2 |
| Type          | String                           |

#### ResourceGroupName

Resource group that contains the storage account.

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

#### StorageAccountName

Storage account name used for uploads.

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

#### StorageAccountLocation

Azure region for the storage account.

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

#### StorageAccountSku

Storage account SKU.

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

#### SubscriptionId

Azure subscription ID used for storage operations.

| 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/org/general/export-non-compliant-devices.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.
