# Microsoft Intune connector thinklet

Configure Microsoft Intune connector thinklets to take specific actions within your workflow.

{% hint style="info" %}
Refer to the [Permissions](https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-get?view=graph-rest-1.0#permissions) section in the Microsoft documentation to view the required authorizations.
{% endhint %}

## Action: Get device enrollment details <a href="#microsoftoutlookconnectorthinklet-action-sendanemailtoonerecipient" id="microsoftoutlookconnectorthinklet-action-sendanemailtoonerecipient"></a>

**Get device enrollment details** verifies that Microsoft Intune manages a device, and retrieves Microsoft Intune device properties. These properties include the managed device ID, enrollment type, enrollment date and time, and ownership type.

The Microsoft Intune connector thinklet relies on the [Get managedDevice](https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-get?view=graph-rest-1.0) API endpoint provided by Microsoft Graph.

<figure><img src="/files/iaDzOhyWmbhSCeDaA431" alt="" width="375"><figcaption></figcaption></figure>

* **Parameters**
  * **Device name**: The device for which you want to obtain the properties.
* **Outputs**
  * **ID (**`ManagedDeviceId`**):** A managed device ID indicating that the device exists in Microsoft Intune.
  * **Enrollment type (**`EnrollmentType`**):** Indicates the type of device enrollment, such as user-driven enrollment, Entra ID enrollment, or other.
  * **Enrollment date and time (**`EnrollmentDateTime`**):** Time and date the device was enrolled in Microsoft Intune.
  * **Ownership type (**`OwnershipType`**):** Indicates whether this device belongs to an individual, a company, or an unknown person.

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="272">Field</th><th>Value</th><th data-hidden></th></tr></thead><tbody><tr><td>Resource Path</td><td><code>/deviceManagement/managedDevices?$filter=(deviceName eq '{{DeviceName}}')&#x26;$select=id,enrolledDateTime,deviceEnrollmentType,managedDeviceOwnerType</code></td><td></td></tr><tr><td>Method</td><td>GET</td><td></td></tr><tr><td>Payload</td><td></td><td></td></tr><tr><td>Outputs</td><td><p><code>EnrollmentType $.value[0].deviceEnrollmentType EnrollmentDateTime $.value[0].enrolledDateTime ManagedDeviceId $.value[0].id</code></p><p><code>OwnershipType $.value[0].managedDeviceOwnerType</code></p></td><td></td></tr></tbody></table>

## Action: **Get device compliance state** <a href="#microsoftoutlookconnectorthinklet-action-sendanemailtotworecipients" id="microsoftoutlookconnectorthinklet-action-sendanemailtotworecipients"></a>

**Get device compliance state** retrieves a managed device's compliance status and details. These details include the device compliance state and device encryption state.

The Microsoft Intune connector thinklet relies on the [Get managedDevice](https://learn.microsoft.com/en-us/graph/api/intune-devices-manageddevice-get?view=graph-rest-1.0) API endpoint provided by Microsoft Graph.

<figure><img src="/files/K8ivamkk5PUabw409ClN" alt="" width="375"><figcaption></figcaption></figure>

* **Parameters**
  * **Device name**: The device for which you want to obtain the properties.
* **Outputs**
  * **Device compliance state (**`DeviceComplianceState`**):** Indicates whether the device complies with Microsoft Intune policies.
  * **Device encryption state (**`DeviceEncryptionState`**):** Indicates whether the device is encrypted.

The table below shows the API Service connector details needed when recreating the connector:

<table><thead><tr><th width="272">Field</th><th>Value</th><th data-hidden></th></tr></thead><tbody><tr><td>Resource Path</td><td><code>/deviceManagement/managedDevices?$filter=(deviceName eq '{{DeviceName}}')&#x26;$select=complianceState,jailBroken,isEncrypted</code></td><td></td></tr><tr><td>Method</td><td>GET</td><td></td></tr><tr><td>Payload</td><td></td><td></td></tr><tr><td>Outputs</td><td><code>DeviceComplianceState $.value[0].complianceState DeviceEncryptionState $.value[0].isEncrypted</code></td><td></td></tr></tbody></table>

Refer to the [Configuring connector thinklets](/platform/user-guide/workflows/creating-workflows/configuring-connector-thinklet.md) documentation for more information about connector thinklets.


---

# 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.nexthink.com/platform/user-guide/workflows/creating-workflows/configuring-connector-thinklet/microsoft-intune-connector-thinklet.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.
