Microsoft Intune
Add Microsoft Intune MDM and MAM capabilities to your iOS and Android app
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.
For details on the SDK itself, see the official Microsoft Intune App SDK documentation.
Microsoft product namesMicrosoft 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
Step 1: Create a Client ID and Tenant ID
Register your app in Microsoft Entra ID to generate your Client ID and Tenant ID.
- Log in to https://portal.azure.com.
- Under Azure Services, click Azure Active Directory.
- In the left-hand menu, select App registrations.
- On the main page, click New registration.
- In the Register an Application screen, enter your app’s name. Ensure that the Accounts in this organizational directory only option is selected.
- Click Register to create your application.
- After registration, you will see the Application (Client) ID and Tenant ID. Copy these values for later use.
Step 2: Create a Client Secret
Create a Client Secret that your app uses to authenticate with Microsoft.
- In the left menu, click Certificates & secrets.
- Under the Client secrets section, click New client secret.
- In the Add a client secret popup, do the following:
- Enter a description for your client secret, such as Client Secret for[your app name].
- Under Expires, select Never to ensure the secret remains valid indefinitely. You may need to configure a different value based on your security policies.
- Click Add.
- The newly created client secret will appear under Client secrets. Copy its value for future use.
Step 3: Grant Microsoft Graph API permissions
To grant your app the necessary permissions, follow these steps:
- In the left-hand menu, click API permissions.
- Click Add a permission.
- In the Request API permissions panel:
- Select Microsoft Graph.
- Select Application permissions.
- Search for and select the permissions listed in the table below.
- Click Add permissions.
- Back on the API permissions page, click Grant admin consent for [your organization].
- Click Yes to confirm.
Add the following Application permissions:
| 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 |
When consent is granted, the Status column shows Granted for [your organization] for each permission.
Technical Best Practises
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 |
Updated 30 days ago