# Intune

## Introduction

Welcome to the documentation for the Automate integration with Intune! This guide aims to provide you with a comprehensive overview of how to utilize the powerful features available through this integration. Intune, Microsoft's management service, enables organizations to efficiently manage and secure a variety of devices including Windows, macOS, iOS, and Android, all from a centralized management console.

## What is Intune?

Intune is a management service designed specifically to support enterprise-level mobile device management, application management, data protection, and security provision. With Intune, organizations can monitor, configure, and secure different types of devices, ensuring compliance and efficiency across their device ecosystem.

#### Key Features of Intune:

* <mark style="color:orange;">**Mobile Device Management (MDM):**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Control and secure mobile devices used by employees.</mark>
* <mark style="color:orange;">**Application Management:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Distribute and manage applications across various platforms.</mark>
* <mark style="color:orange;">**Data Protection:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Implement policies to protect corporate data on devices.</mark>
* <mark style="color:orange;">**Security Provision:**</mark> <mark style="color:orange;"></mark><mark style="color:orange;">Enforce security measures such as device encryption and threat detection.</mark>

## Automate Integration with Intune

The Automate integration with Intune offers a range of actions to automate device management tasks and enhance operational efficiency. Whether it's deleting devices, retrieving device information, or updating device configurations, these actions simplify the management of your Intune environment.

#### Available Actions:

* Delete a Device
* Get a Device
* Get All Devices
* Get Discovered Apps of a Device
* List Devices Categories
* Retire The Device
* Update a Device
* Wipe a Device

## Using the Integration

To begin using the Automate-Intune integration, you'll need to define your credentials and configure the necessary inputs for each action at [Vault](/userguide/product-features/management/vault.md). Let's explore how to use each action effectively:

### Credentials

Credentials establish a secure connection between Automate and Intune. Here's how you can set them up:

1. **Select Your Credentials:** Choose the appropriate credentials for your Intune account.

### Data Management

Efficiently manage input parameters for each action using the Data Manager:

1. **Device ID:** Specify or select the device for which you want to perform the action. A maximum of 50 devices are listed in the dropdown for selection.

## How To Use Actions

{% embed url="<https://drive.google.com/file/d/1iMvOhc0zVohUVrYqbEYhRe4exlOyHDwU/view?usp=sharing>" %}

Let's dive into the available actions within the Automate-Intune integration and how to use them:

### Delete a Device

<figure><img src="/files/1Ev8WECaxeKzpMbswbju" alt=""><figcaption></figcaption></figure>

**Description:** Deletes a specified device from the Intune environment.

**Purpose:** This action removes a device from the management system.

**Usage:**

* Provide the Device ID of the device to be deleted.
* Execute the action to delete the device.

**Input:**

* Device ID: <mark style="color:green;">Specify or select the device to delete.</mark>

**Output:**

* None

***

### Get a Device

<figure><img src="/files/MPTVnhGVMcihNvvowx9Y" alt=""><figcaption></figcaption></figure>

**Description:** Retrieves detailed information about a specific device.

**Purpose:** This action fetches comprehensive details of a device in the Intune environment.

**Usage:**

* Provide the Device ID of the device to retrieve information for.
* Execute the action to get details of the device.

**Input:**

* Device ID: <mark style="color:green;">Specify or select the device to retrieve information for.</mark>

**Output:**

* Detailed information about the selected device.

***

### Get All Devices

**Description:** Retrieves a list of all devices registered in the Intune environment.

**Purpose:** This action provides an overview of all devices managed in the system.

**Usage:**

* No input parameters required.
* Execute the action to get the list of all devices.

**Input:**

* None

**Output:**

* List of all devices in the system.

***

### Get Discovered Apps of a Device

<figure><img src="/files/0SQSgbmYX5C2YtOOhI0H" alt=""><figcaption></figcaption></figure>

**Description:** Retrieves a list of apps discovered on a specific device.

**Purpose:** This action provides insight into the apps installed on a device.

**Usage:**

* Provide the Device ID of the device to retrieve apps for.
* Execute the action to get the list of apps.

**Input:**

* Device ID: <mark style="color:green;">Specify or select the device to retrieve apps for.</mark>

**Output:**

* List of apps installed on the selected device.

***

### List Device Categories

**Description:** Retrieves a list of device categories within the Intune environment.

**Purpose:** This action provides categories under which devices are classified.

**Usage:**

* No input parameters required.
* Execute the action to get the list of device categories.

**Input:**

* None

**Output:**

* List of device categories.

***

### Retire a Device

<figure><img src="/files/JdvaEHL4QLzg4PP2MXVc" alt=""><figcaption></figcaption></figure>

**Description:** Retires or decommissions a specified device from the Intune environment.

**Purpose:** This action removes a device from active service.

**Usage:**

* Provide the Device ID of the device to retire.
* Execute the action to retire the device.

**Input:**

* Device ID: <mark style="color:green;">Specify or select the device to retire.</mark>

**Output:**

* Information confirming the retirement of the device.

***

### Update a Device

<figure><img src="/files/qloCHGKWs6DwsLHeAmn5" alt=""><figcaption></figcaption></figure>

**Description:** Updates configuration settings for a specified device in the Intune environment.

**Purpose:** This action modifies settings or attributes of a managed device.

**Usage:**

* Provide the Device ID of the device to update.
* Execute the action to update the device.

**Input:**

* Device ID: <mark style="color:green;">Specify or select the device to update.</mark>

**Output:**

* Information confirming the update of the device.

***

### Wipe a Device

<figure><img src="/files/NHa7iYQEiTutLCWNiwv7" alt=""><figcaption></figcaption></figure>

**Description:** Wipes data from a specified device in the Intune environment.

**Purpose:** This action removes all data from a device, restoring it to factory settings.

**Usage:**

* Choose whether to keep user data on the device (Keep User Data: Yes or No).
* Provide the Device ID of the device to wipe.
* Choose whether to keep enrollment data (Keep Enrollment Data: Yes or No).
* Execute the action to wipe the device.

**Input:**

* Keep User Data: <mark style="color:green;">Choose whether to keep user data on the device (Yes or No).</mark>
* Device ID: <mark style="color:green;">Specify or select the device to wipe.</mark>
* Keep Enrollment Data: <mark style="color:green;">Choose whether to keep enrollment data (Yes or No).</mark>

**Output:**

* Information confirming the device wipe process.

***

### List All Devices with Filter

#### **Description and Purpose**

The **List All Devices with Filter** action enables users to query Microsoft Intune data with precision. Using the `Filter` parameter, users can retrieve subsets of a collection based on specific conditions. The `Select` parameter allows customization of the returned properties, ensuring the output includes only relevant data. This action optimizes data handling by focusing on the most important information while minimizing unnecessary overhead.

<figure><img src="/files/9tjtcL2JEhiCReUg93GA" alt=""><figcaption></figcaption></figure>

#### **Usage Instructions**

{% stepper %}
{% step %}
**Define Filter Conditions**

* Use the `Filter` parameter to specify the criteria for the data subset.
* Examples:
  * `userType eq 'Member'`: Retrieves all users where the user type is "Member".
  * `not(userType eq 'Member')`: Excludes users with the user type "Member".
  * `registrationDateTime le 2021-01-02T12:00:00Z`: Retrieves resources registered on or before the given date.
* Refer to the [Microsoft Graph Filter Query Parameter Documentation](https://learn.microsoft.com/en-us/graph/filter-query-parameter) for more details.
  {% endstep %}

{% step %}
**Specify Properties to Return**

* Use the `Select` parameter to define which properties to include in the results.
* Example: `userId,deviceName`.
  {% endstep %}

{% step %}
**Execute the Action**

Run the action to retrieve the filtered data, ensuring that only the selected properties are returned.
{% endstep %}

{% step %}
**Review the Results**

Check the output for the filtered and selected data, which will be presented in JSON format.
{% endstep %}
{% endstepper %}

{% hint style="success" %}

#### **Inputs**

* **Filter**: The filter query to refine the dataset. For example:
  * `userType eq 'Member'`
  * `registrationDateTime le 2021-01-02T12:00:00Z`
* **Select**: A comma-separated list of properties to include in the result. For example:
  * `userId`
  * `deviceName`
    {% endhint %}

<details>

<summary>Sample Input</summary>

* **Filter**: `userType eq 'Member'`
* **Select**: `userId,deviceName`
* **Filter**: `not(userType eq 'Member')`
* **Select**: `userId,deviceName`
* **Filter**: `registrationDateTime le 2021-01-02T12:00:00Z`
* **Select**: `userId,deviceName`

</details>

{% hint style="danger" %}

#### **Outputs**

* **Filtered Data**: A collection of filtered devices based on the provided `Filter` parameter.
* **Selected Fields**: A collection of device data containing only the properties specified in the `Select` parameter.
  {% endhint %}

<details>

<summary>Sample Output</summary>

```json
{
  "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#deviceManagement/managedDevices",
  "@odata.count": 1,
  "value": [
    {
      "activationLockBypassCode": null,
      "androidSecurityPatchLevel": "",
      "azureADDeviceId": "a0fecea4-490d-4160-bddc-e5e3e538ab27",
      "azureADRegistered": true,
      "complianceGracePeriodExpirationDateTime": "9999-12-31T23:59:59Z",
      "complianceState": "compliant",
      "configurationManagerClientEnabledFeatures": null,
      "deviceActionResults": [],
      "deviceCategoryDisplayName": "Unknown",
      "deviceEnrollmentType": "userEnrollment",
      "deviceHealthAttestationState": null,
      "deviceName": "ErdemSakın",
      "deviceRegistrationState": "registered",
      "easActivated": true,
      "easActivationDateTime": "0001-01-01T00:00:00Z",
      "easDeviceId": "B8C8ECA88E5CE9C0503E6110AE1B1536",
      "emailAddress": "erdem.sakin@autommate.com",
      "enrolledDateTime": "2024-11-11T15:42:51Z",
      "enrollmentProfileName": null,
      "ethernetMacAddress": null,
      "exchangeAccessState": "none",
      "exchangeAccessStateReason": "none",
      "exchangeLastSuccessfulSyncDateTime": "0001-01-01T00:00:00Z",
      "freeStorageSpaceInBytes": 311969185792,
      "iccid": null,
      "id": "d216844c-73c1-4ad5-9617-5393478b031c",
      "imei": "",
      "isEncrypted": true,
      "isSupervised": false,
      "jailBroken": "Unknown",
      "lastSyncDateTime": "2024-11-26T18:00:15Z",
      "managedDeviceName": "erdem.sakin_Windows_11/11/2024_3:42 PM",
      "managedDeviceOwnerType": "personal",
      "managementAgent": "mdm",
      "managementCertificateExpirationDate": "2025-11-10T23:22:02Z",
      "manufacturer": "Micro-Star International Co., Ltd.",
      "meid": "",
      "model": "GF63 Thin 10SC",
      "notes": null,
      "operatingSystem": "Windows",
      "osVersion": "10.0.22631.4460",
      "partnerReportedThreatState": "unknown",
      "phoneNumber": "",
      "physicalMemoryInBytes": 0,
      "remoteAssistanceSessionErrorDetails": null,
      "remoteAssistanceSessionUrl": null,
      "requireUserEnrollmentApproval": null,
      "serialNumber": "9S716R512263ZL5000111",
      "subscriberCarrier": "",
      "totalStorageSpaceInBytes": 511197577216,
      "udid": null,
      "userDisplayName": "Erdem Sakin",
      "userId": "be8b9977-52c7-4142-b3fd-77b8a4e80ed3",
      "userPrincipalName": "erdem.sakin@autommate.com",
      "wiFiMacAddress": "F077C30700A3"
    }
  ]
}
```

</details>


---

# 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.autommate.com/userguide/libraries/integration/intune.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.
