Skip to content

Getting Started

GitHub
  1. Install the package

    Terminal window
    bun add @capgo/capacitor-intune
  2. Sync native projects

    Terminal window
    bunx cap sync
  3. Complete native Intune setup Follow the dedicated iOS setup and Android setup pages. Intune still requires host-app native configuration for brokered auth, redirect URIs, manifests, entitlements, and MSAL config.

  • Capacitor 8+
  • Android with Intune Android SDK 12.0.3
  • iOS with Intune iOS SDK 21.5.1
  • iOS deployment target 17.0+

Ionic’s Intune docs currently call out a January 19, 2026 cutoff for apps built with Xcode 26, requiring Intune iOS SDK 21.1.0+. This plugin already uses 21.5.1.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.addListener('appConfigChange', (result) => {
console.log('App config changed', result.accountId);
});
await IntuneMAM.addListener('policyChange', (result) => {
console.log('Policy changed', result.accountId);
});
const auth = await IntuneMAM.acquireToken({
scopes: ['https://graph.microsoft.com/.default'],
loginHint: 'alex@example.com',
});
await IntuneMAM.registerAndEnrollAccount({
accountId: auth.accountId,
});
const appConfig = await IntuneMAM.appConfig({
accountId: auth.accountId,
});
const policy = await IntuneMAM.getPolicy({
accountId: auth.accountId,
});
console.log({ auth, appConfig, policy });
const auth = await IntuneMAM.acquireToken({
scopes: ['https://graph.microsoft.com/.default'],
});
await IntuneMAM.registerAndEnrollAccount({
accountId: auth.accountId,
});
const token = await IntuneMAM.acquireTokenSilent({
accountId: 'AAD_OBJECT_ID',
scopes: ['https://graph.microsoft.com/.default'],
forceRefresh: true,
});
const user = await IntuneMAM.enrolledAccount();
await IntuneMAM.logoutOfAccount({ accountId: 'AAD_OBJECT_ID' });
await IntuneMAM.deRegisterAndUnenrollAccount({ accountId: 'AAD_OBJECT_ID' });
  • acquireToken(options): Start Microsoft sign-in and return token plus account metadata.
  • acquireTokenSilent(options): Read a cached token for an existing account.
  • registerAndEnrollAccount(options): Register the MSAL account with Intune and trigger enrollment.
  • loginAndEnrollAccount(): Let Intune drive the login and enrollment flow.
  • appConfig(user): Read Intune app configuration values for the account.
  • getPolicy(user): Read the current Intune app protection policy for the account.
  • groupName(user): Read the common GroupName config helper value when present.
  • sdkVersion(): Inspect bundled Intune and MSAL versions.
  • Web is not supported.
  • iOS and Android both require native project configuration beyond cap sync.
  • Your Azure registration, Intune policy assignment, redirect URIs, and entitlements remain app-specific.

If you are using Getting Started to plan migration and enterprise operations, connect it with Using @capgo/capacitor-intune for the native capability in Using @capgo/capacitor-intune, Capgo Enterprise for the product workflow in Capgo Enterprise, Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives, Capgo Alternatives for the product workflow in Capgo Alternatives, and Capgo Consulting for the product workflow in Capgo Consulting.