> For the complete documentation index, see [llms.txt](https://docs.fastn.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fastn.ai/connectors/catalog/it-service/microsoft-intune.md). Agents can also search and read this documentation through its [MCP server](https://docs.fastn.ai/~gitbook/mcp).

# Microsoft Intune

Microsoft Intune manages company devices. Read managed devices, manage device groups and scripts, and set up change subscriptions.

![Microsoft Intune logo](https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-f54008002f231fec2243b814df6b3fd8488330bd%2Fonedrive.png?alt=media)

|                    |                                                                                          |
| ------------------ | ---------------------------------------------------------------------------------------- |
| **Category**       | [IT and service management](https://docs.fastn.ai/connectors/catalog/it-service.md)      |
| **Website**        | [graph.microsoft.com](https://graph.microsoft.com)                                       |
| **Authentication** | OAuth 2.0                                                                                |
| **Slug**           | `microsoftIntune`                                                                        |
| **On fastn.ai**    | [Embed Microsoft Intune in your product](https://fastn.ai/integrations/microsoft-intune) |

## Setup guide

This guide shows how to register your own Microsoft Entra app for Microsoft Intune and add it to Fastn, so your customers sign in to Intune through your app.

For Microsoft Intune's own setup steps, see [Register an application with the Microsoft identity platform](https://learn.microsoft.com/en-us/graph/auth-register-app-v2) in the Microsoft Intune documentation.

### Before you start

* You need the Owner, Admin or Developer role in Fastn.
* You need a Microsoft Entra ID tenant where you can register apps. Microsoft lists Cloud Application Administrator as the least privileged role that can register an app.
* The customers who connect need Microsoft Intune to be correctly licensed in their tenant. Microsoft states that using the Graph API to configure Intune still requires a licensed Intune service.

### Create your Microsoft Intune app

1. Sign in to the [Microsoft Entra admin center](https://entra.microsoft.com). If you have several tenants, use the **Settings** icon and the **Directories + subscriptions** menu to switch to the tenant you want to register the app in.
2. Go to **Identity** > **Applications** > **App registrations** and select **New registration**.
3. Enter a **Name** for the app.
4. Under **Supported account types**, select **Accounts in any organizational directory** so users from your customers' Microsoft Entra tenants can sign in.
5. Leave **Redirect URI (optional)** empty and select **Register**.
6. On the app's **Overview** page, copy the **Application (client) ID**.
7. Under **Manage**, select **Authentication**, then **Add a platform**, and choose **Web**. In **Redirect URI**, enter `https://oauth.live.fastn.ai` exactly, with no trailing slash, and select **Configure**.
8. Select **API permissions** > **Add a permission** > **Microsoft Graph** > **Delegated permissions**. Select these permissions, then select **Add permissions**:
   * `offline_access`
   * `openid`
   * `User.Read`
   * `Organization.Read.All`
   * `Group.Read.All`
   * `Group.ReadWrite.All`
   * `GroupMember.ReadWrite.All`
   * `Device.Read.All`
   * `DeviceManagementManagedDevices.Read.All`
   * `DeviceManagementConfiguration.ReadWrite.All`
   * `DeviceManagementServiceConfig.Read.All`
   * `DeviceManagementRBAC.Read.All`
   * `DeviceManagementApps.Read.All`
9. If any of these permissions require admin consent in your tenant, an admin can select **Grant admin consent for** on the **API permissions** page. Admins in your customers' tenants may also need to consent before their users can connect.
10. Select **Certificates & secrets** > **Client secrets** > **New client secret**. Add a description, pick an expiration (24 months or less), and select **Add**.
11. Copy the secret's **Value** right away. Microsoft does not show it again after you leave the page. Note the expiration date, because you need to create a new secret and update Fastn before it expires.

### Add your app to Fastn

1. In Fastn, go to Build → Integrations → Connectors and open **Microsoft Intune**.
2. Open the **Auth** tab and select **Manage providers**.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-3ede06b5cc4ded5963757ae1ea7714f26d4a44e1%2Fauth-tab.png?alt=media" alt="The connector&#x27;s Auth tab with Manage providers"><figcaption><p>Open the connector's Auth tab, then Manage providers.</p></figcaption></figure>

3. Select **+ Create Provider**.
4. In the **New Auth Provider** form, enter a **Name** and an optional **Description**.
5. Paste the **Application (client) ID** into **Client ID** and the secret **Value** into **Client Secret**.
6. In **Scopes**, enter the permissions you added in step 8 of the previous section.

<figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-3397dfe36d6198ebc9ac3ea4f1708dbe1099ca0e%2Fnew-auth-provider.png?alt=media" alt="The New Auth Provider form"><figcaption><p>The New Auth Provider form: paste your app's Client ID and Client Secret.</p></figcaption></figure>

7. Save the provider, then choose **Use this app** so it becomes the Preferred app.
8. In your widget, set the Microsoft Intune connector's **Auth provider** setting to your app instead of **Use platform default**.

Customers who skip this setup sign in through Fastn's shared app for Microsoft Intune.

### Connect in Fastn

Your customers connect Microsoft Intune from your widget. To connect an account yourself:

1. Go to **Build → Integrations → Connectors** and search for **Microsoft Intune**.
2. Select **Connect** on the Microsoft Intune card.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-586dd03cdc0c6904263f58928d7a531eae2f85df%2Fconnect-search.png?alt=media" alt="The Connectors page in Fastn with ServiceNow typed in the search box and the ServiceNow card showing a Connect button"><figcaption><p>Search for the connector, then select Connect on its card. ServiceNow is shown here.</p></figcaption></figure>
3. Keep the **Default** auth provider, or choose your own OAuth app if you added one. Pick the **Scopes** you need, select **Authorize**, then sign in to Microsoft Intune and approve access in the window that opens.

   <figure><img src="https://1255842839-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3iSr2Tx8FvvuoLPncziH%2Fuploads%2Fgit-blob-0e2bbdd7109cec207402cf6883484b8525b7fbf5%2Fconnect-oauth.png?alt=media" alt="The Connect Salesforce dialog for OAuth 2.0 with the Default auth provider, an optional account name, the Scopes selector and an Authorize button"><figcaption><p>A connect form for OAuth 2.0. Salesforce is shown here.</p></figcaption></figure>
4. Check that the connection appears under **Operate → Connections** with the status `Active`. Your workflows can now use Microsoft Intune's actions.

For more detail, see [Connect an app](https://docs.fastn.ai/build/integrations/connectors/connect-an-app.md).

## Actions

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Add Device To Group</td><td><code>addDeviceToGroup</code></td><td>Adds a device to a Microsoft Entra ID security group so that Intune policies, scripts and apps assigned to that group target the device. Member Reference URL is the full Graph read URL of the device, for example https://graph.microsoft.com/v1.0/devices/{device-object-id}. Only security groups accept device members.</td></tr><tr><td>Create Device Management Script</td><td><code>createScript</code></td><td>Creates an Intune device management (PowerShell) script that can then be assigned to device or user groups. Script Content must be base64-encoded. The deviceManagementScripts resource exists only on the Microsoft Graph beta endpoint, so this action calls https://graph.microsoft.com/beta.</td></tr><tr><td>Create Group</td><td><code>createGroup</code></td><td>Creates a Microsoft Entra ID security group or Microsoft 365 group that Intune policies, scripts and apps can be assigned to. Display Name, Mail Nickname, Mail Enabled and Security Enabled are required; set Group Types to ['Unified'] for a Microsoft 365 group or leave it empty for a security group.</td></tr><tr><td>Create Subscription</td><td><code>createSubscription</code></td><td>Creates a Microsoft Graph change-notification subscription so a listener endpoint receives notifications when the watched resource changes, for example groups or devices. Microsoft Graph validates the Notification URL synchronously: it POSTs a validationToken to that URL and the endpoint must echo it back as plain text within 10 seconds, otherwise creation fails.</td></tr><tr><td>Delete Device Management Script</td><td><code>deleteScript</code></td><td>Permanently deletes an Intune device management (PowerShell) script and removes it from every group it was assigned to. The deviceManagementScripts resource exists only on the Microsoft Graph beta endpoint, so this action calls https://graph.microsoft.com/beta.</td></tr><tr><td>Delete Group</td><td><code>deleteGroup</code></td><td>Deletes a Microsoft Entra ID group by its object ID. Deleted Microsoft 365 groups are moved to a soft-deleted state for 30 days; security groups are removed permanently. Use with care - deleting a group removes every Intune assignment that targeted it.</td></tr><tr><td>Delete Subscription</td><td><code>deleteSubscription</code></td><td>Deletes a Microsoft Graph change-notification subscription so the listener endpoint stops receiving notifications for that resource.</td></tr><tr><td>Execute Batch</td><td><code>executeBatch</code></td><td>Combines up to 20 Microsoft Graph requests into a single JSON batch call, cutting network round trips when reading several Intune or directory resources at once. Each entry needs a unique id, a method and a service-root-relative url such as /deviceManagement/managedDevices. The outer call</td></tr><tr><td>Get Device Compliance Policy Device State Summary</td><td><code>getDeviceCompliancePolicyDeviceStateSummary</code></td><td>Retrieves the tenant-wide summary of device compliance, counting how many devices are compliant, non-compliant, in a grace period, in conflict, in error or not yet evaluated against their Intune compliance policies.</td></tr><tr><td>Get Group By ID</td><td><code>getGroupById</code></td><td>Retrieves a single Microsoft Entra ID group by its object ID. Use the Select input to request properties that are not returned by default.</td></tr></tbody></table>

<details>

<summary>View 25 more actions</summary>

<table><thead><tr><th width="240">Action</th><th width="260">Slug</th><th>What it does</th></tr></thead><tbody><tr><td>Get Managed Device</td><td><code>getManagedDevice</code></td><td>Retrieves a single Intune managed device by its identifier, returning its owner, platform, compliance state, enrolment details and hardware identifiers.</td></tr><tr><td>Get Managed Device Overview</td><td><code>getManagedDeviceOverview</code></td><td>Retrieves the tenant-wide summary of Intune enrolment, including total enrolled device count, dual-enrolled devices and the breakdown of devices by operating system and by management agent.</td></tr><tr><td>Get Organization</td><td><code>getOrganization</code></td><td>Retrieves the organization (tenant) profile, including the tenant ID, display name, verified domains, country and the service plans provisioned for the tenant. Useful for confirming that an Intune service plan is present before calling the device management endpoints.</td></tr><tr><td>Get Security Groups Count</td><td><code>getSecurityGroupsCount</code></td><td>Returns the number of Microsoft Entra ID security groups in the organization as a plain integer, using the /groups/$count advanced query. The ConsistencyLevel header set to eventual is required for $count and is sent automatically.</td></tr><tr><td>List Detected Apps</td><td><code>listDetectedApps</code></td><td>Lists the applications Intune has detected on managed devices, with each app's name, version, publisher, size and the number of devices it was found on.</td></tr><tr><td>List Device Compliance Policies</td><td><code>listDeviceCompliancePolicies</code></td><td>Lists the Intune device compliance policies defined in the tenant. Each policy is a platform-specific subtype identified by its @odata.type, so the properties returned vary between Windows, iOS, Android and macOS policies.</td></tr><tr><td>List Device Configuration Device State Summaries</td><td><code>listDeviceConfigurationDeviceStateSummaries</code></td><td>Retrieves the tenant-wide summary of device configuration profile deployment, counting how many devices succeeded, failed, are pending, are in conflict or are not applicable for their assigned Intune configuration profiles.</td></tr><tr><td>List Device Configurations</td><td><code>listDeviceConfigurations</code></td><td>Lists the Intune device configuration profiles defined in the tenant. Each profile is a platform-specific subtype identified by its @odata.type, so the properties returned vary by platform and profile kind.</td></tr><tr><td>List Device Enrollment Configurations</td><td><code>listDeviceEnrollmentConfigurations</code></td><td>Lists the Intune device enrolment configurations for the tenant, such as enrolment restrictions and the device limit policy, with their priority and assignment metadata. Each entry is a subtype identified by its @odata.type.</td></tr><tr><td>List Device Management Partners</td><td><code>listDeviceManagementPartners</code></td><td>Lists the third-party device management partners integrated with Intune, such as mobile threat defence or partner MDM providers, with each partner's state, heartbeat and configuration URL.</td></tr><tr><td>List Device Management Scripts</td><td><code>listScripts</code></td><td>Lists the Intune device management (PowerShell) scripts configured in the tenant, returning each script's name, run-as context, signature enforcement and base64-encoded content. The deviceManagementScripts resource exists only on the Microsoft Graph beta endpoint, so this action calls https://graph.microsoft.com/beta.</td></tr><tr><td>List Devices</td><td><code>listDevices</code></td><td>Lists the device objects registered in the Microsoft Entra ID directory, including devices enrolled in Intune. Advanced queries such as $search or $count require the ConsistencyLevel header set to eventual.</td></tr><tr><td>List Devices By Group</td><td><code>listDevicesByGroup</code></td><td>Lists the device members of a Microsoft Entra ID group using the microsoft.graph.device OData cast, so only devices are returned. Useful for reading the device membership of an Intune assignment group. The OData cast requires the ConsistencyLevel header set to eventual.</td></tr><tr><td>List Exchange Connectors</td><td><code>listExchangeConnectors</code></td><td>Lists the Intune Exchange connectors configured for the tenant, showing each connector's server, status, version and last synchronisation time.</td></tr><tr><td>List Groups</td><td><code>listGroups</code></td><td>Lists the Microsoft Entra ID groups in the organization, excluding dynamic distribution groups. These are the groups Intune policies, scripts and apps are assigned to. Advanced queries such as $search or $count require the ConsistencyLevel header set to eventual.</td></tr><tr><td>List Groups Delta</td><td><code>listGroupsDelta</code></td><td>Tracks changes to Microsoft Entra ID groups without reading the whole collection, returning created, updated and deleted groups since the last round. Call once with no token to seed the state, then pass the token from the previous @odata.deltaLink as Delta Token for each subsequent round. Select 'members' to track membership changes.</td></tr><tr><td>List Managed Devices</td><td><code>listManagedDevices</code></td><td>Lists the devices enrolled in and managed by Microsoft Intune, returning each managedDevice with its owner, platform, compliance state, enrolment details and hardware identifiers. Requires an active Intune licence on the tenant.</td></tr><tr><td>List Mobile Apps</td><td><code>listMobileApps</code></td><td>Lists the applications added to Intune for deployment to managed devices. Each app is a platform-specific subtype identified by its @odata.type, such as a Windows store app, iOS store app or line-of-business app.</td></tr><tr><td>List Role Definitions</td><td><code>listRoleDefinitions</code></td><td>Lists the Intune role-based access control role definitions in the tenant, both the built-in roles and any custom roles, with the permissions each one grants.</td></tr><tr><td>List Security Groups</td><td><code>listSecurityGroups</code></td><td>Lists only the Microsoft Entra ID security groups in the organization, using the documented filter securityEnabled eq true and mailEnabled eq false. Security groups are the group type Intune device assignments normally target.</td></tr><tr><td>List Subscriptions</td><td><code>listSubscriptions</code></td><td>Lists the Microsoft Graph change-notification subscriptions the signed-in app and user currently hold, with the watched resource, notification endpoint and expiry of each. Use it to confirm a subscription was created or removed.</td></tr><tr><td>List Terms And Conditions</td><td><code>listTermsAndConditions</code></td><td>Lists the Intune terms and conditions policies users must accept before enrolling a device, with the title, body text and acceptance statement of each.</td></tr><tr><td>List Transitive Members</td><td><code>listTransitiveMembers</code></td><td>Lists every member of a Microsoft Entra ID group as a flat list, including members inherited through nested groups. Use it to see the full effective target of an Intune assignment. Query parameters other than $expand require the ConsistencyLevel header set to eventual, which is sent automatically.</td></tr><tr><td>List Troubleshooting Events</td><td><code>listTroubleshootingEvents</code></td><td>Lists the Intune device management troubleshooting events recorded for the tenant, each with its event date, correlation ID and the user and device it relates to.</td></tr><tr><td>Reauthorize Subscription</td><td><code>reauthorizeSubscription</code></td><td>Reauthorizes a Microsoft Graph change-notification subscription after a reauthorizationRequired lifecycle notification, proving the app still holds valid permissions on the watched resource. Takes no request body and</td></tr></tbody></table>

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fastn.ai/connectors/catalog/it-service/microsoft-intune.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
