> ## Documentation Index
> Fetch the complete documentation index at: https://docs.median.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Intune

> Add the Intune App SDK to your app for Microsoft Intune MDM and MAM, and register your app in Microsoft Entra ID with the required permissions.

Median's Microsoft Intune plugin integrates the **Intune App SDK** into your iOS and Android apps, so you can manage devices and protect corporate data with Mobile Device Management (MDM) and Mobile Application Management (MAM) through [Microsoft Intune](https://learn.microsoft.com/en-us/mem/intune/fundamentals/what-is-intune).

For details on the SDK itself, see the official [Microsoft Intune App SDK documentation](https://learn.microsoft.com/en-us/mem/intune/developer/app-sdk).

> [!NOTE]
>
> **Microsoft product names**
>
> Microsoft has renamed several products referenced in older guides. **Azure Active Directory** is now **Microsoft Entra ID**, and **Microsoft Endpoint Manager** is now the **Microsoft Intune admin center**. Menu labels in the Microsoft portals may differ slightly from the steps below as Microsoft updates its interface.

## Use cases

The Microsoft Intune plugin is a good fit for apps that need to:

| Use case | Example |
| - | - |
| **Enterprise applications** | Internal apps that handle sensitive business data and must comply with corporate device policies |
| **Managed device fleets** | Apps deployed to company-owned iOS and Android devices enrolled in Intune |
| **Bring your own device (BYOD)** | Apps used on personal devices where corporate data must be protected at the app level |
| **Regulated industries** | Healthcare, finance, and government apps that must meet security and compliance requirements |

## Prerequisites

To integrate and configure the Intune Mobile SDK into your app, ensure you have the following:

* Microsoft Intune account
* Client ID
* Tenant ID
* Client secret

The implementation steps below showcase where to find each of the required configuration parameters.

## Integration guide

**1. Register your app and get the Client ID and Tenant ID**

Register your app in Microsoft Entra ID to get your **Client ID** and **Tenant ID**.

1. Sign in to the [Azure portal](https://portal.azure.com).
2. Under **Azure services**, select **Microsoft Entra ID**.
3. In the left menu, select **App registrations**.
4. Select **New registration**.
5. Enter a name for your app, and under **Supported account types**, select **Accounts in this organizational directory only**.
6. Select **Register**.
7. On the app's **Overview** page, copy the **Application (client) ID** and **Directory (tenant) ID**. You'll need both values later.

**2. Create a client secret**

Create a client secret that your app uses to authenticate with Microsoft.

1. In the left menu, select **Certificates & secrets**.
2. Under **Client secrets**, select **New client secret**.
3. Enter a description, such as **Client Secret for \[your app name]**.
4. Under **Expires**, choose an expiration period that follows your organization's security policy.
5. Select **Add**.
6. Copy the secret's **Value**.

> [!WARNING]
>
> **Copy the secret now**
>
> The secret value is only shown once, right after you create it. Copy it before you leave the page. If you lose it, you'll need to create a new secret.

**3. Grant Microsoft Graph API permissions**

Give your app read access to devices and groups, and permission to manage Intune devices.

| Permission | Purpose |
| - | - |
| `Device.Read.All` | Read device properties in your directory |
| `Group.Read.All` | Read group information in your directory |
| `DeviceManagementManagedDevices.ReadWrite.All` | Read and manage Intune managed devices |

1. In the left menu, select **API permissions**.
2. Select **Add a permission**, then select **Microsoft Graph**.
3. Select **Application permissions**.
4. Search for and select each permission in the table above, then select **Add permissions**.
5. Select **Grant admin consent for \[your organization]**, then select **Yes** to confirm.

When consent is granted, the **Status** column shows **Granted for \[your organization]** for each permission.

## Technical best practices

### Follow the principle of least privilege

Grant only the three permissions listed above. Avoid adding additional Microsoft Graph permissions to this app registration unless Median or Microsoft documentation requires them.

### Use a dedicated app registration

Create a separate app registration for each Median app and each environment (for example, testing and production). This makes it easier to rotate credentials, audit access, and revoke access without affecting other apps.

### Rotate secrets before they expire

Choose the shortest expiration period your team can manage, and rotate the Client Secret before it expires. After rotating, update the value in Median and rebuild your app if required.

### Protect your credentials

Store the Client Secret in a secrets manager or password vault. If you suspect it has been exposed, delete it in **Certificates & secrets** and create a new one immediately.

### Verify consent before testing

Confirm that all three permissions show **Granted** in the **Status** column before testing on a device. Missing consent is the most common cause of Intune configuration errors.

## Troubleshooting

| Issue | Cause | Solution |
| - | - | - |
| **Grant admin consent** button is disabled | Your account lacks the required administrator role | Ask a Global Administrator or Privileged Role Administrator to grant consent |
| **Status** does not show **Granted** | Admin consent was not completed | Click **Grant admin consent** and confirm |
| Error `AADSTS7000215` (invalid client secret) | The Secret ID was used instead of the Secret **Value** | Use the secret **Value**. If you no longer have it, create a new secret |
| Error `AADSTS7000222` (expired client secret) | The Client Secret has expired | Create a new secret in **Certificates & secrets** and update it in Median |
| Cannot find the Client ID or Tenant ID | You are not on the app's **Overview** page | Open **App registrations**, select your app, and view **Overview** |


## Related topics

- [Enterprise overview](https://docs.median.co/docs/enterprise.md)
- [Salesforce overview](https://docs.median.co/docs/salesforce.md)
- [Integrations](https://docs.median.co/docs/integrations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.