Guide
Tutorial on Persona
Using @capgo/capacitor-intune
Capacitor plugin for Microsoft Intune MAM enrollment, app protection policies, app config, and MSAL authentication.
Install
bun add @capgo/capacitor-intune
bunx cap sync
What This Plugin Exposes
acquireToken- Present the Microsoft sign-in flow and return an access token plus the account metadata.acquireTokenSilent- Acquire a token from the MSAL cache for a previously signed-in user.registerAndEnrollAccount- Register a previously authenticated account with Intune and start enrollment.loginAndEnrollAccount- Ask Intune to authenticate and enroll a user without first requesting an app token.
Example Usage
acquireToken
Present the Microsoft sign-in flow and return an access token plus the account metadata.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);
acquireTokenSilent
Acquire a token from the MSAL cache for a previously signed-in user.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);
registerAndEnrollAccount
Register a previously authenticated account with Intune and start enrollment.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);
loginAndEnrollAccount
Ask Intune to authenticate and enroll a user without first requesting an app token.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();
Full Reference
- GitHub: https://github.com/Cap-go/capacitor-persona/
- Docs: /docs/plugins/persona/
Keep going from Using @capgo/capacitor-intune
If you are using Using @capgo/capacitor-intune to plan authentication and account flows, connect it with @capgo/capacitor-intune for the implementation detail in @capgo/capacitor-intune, Getting Started for the implementation detail in Getting Started, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, and @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric.