Inizia
Copiare un prompt di impostazione con i passaggi di installazione e la guida markdown completa per questo plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-intune`, `@capgo/capacitor-persona`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/persona/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Installare
Sezione intitolata “Installare”bun add @capgo/capacitor-intunebunx cap syncImporta
Sezione intitolata “Importa”import { IntuneMAM } from '@capgo/capacitor-intune';API Panoramica
Sezione intitolata “API Panoramica”acquireToken
Sezione intitolata “acquireToken”Presenta il flusso di accesso Microsoft e restituisce un token di accesso più i metadati dell'account.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);acquireTokenSilent
Sezione intitolata “acquireTokenSilent”Acquisisci un token dal cache MSAL per un utente precedentemente acceduto.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);registerAndEnrollAccount
Sezione intitolata “registraEiscriviAccount”Registra un account precedentemente autenticato con Intune e avvia l'iscrizione.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);loginAndEnrollAccount
Sezione intitolata “loginEiscriviAccount”Chiedi a Intune di autenticare e iscrivere l'utente senza richiedere prima un token per l'applicazione.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();enrolledAccount
Sezione intitolata “accountIscritto”Restituisci l'account Intune correntemente iscritto, se ne esiste uno disponibile.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.enrolledAccount();deRegisterAndUnenrollAccount
Sezione intitolata “deRegistraEsvuotaAccount”Deregistra l'account da Intune e attiva lo svuotamento selettivo quando applicabile.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({} as IntuneMAMUser);logoutOfAccount
Sezione intitolata “logoutOfAccount”Esegui l'accesso dell'utente a MSAL senza svincolare l'account Intune.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);appConfig
Sezione intitolata “appConfig”Esegui la fetch della configurazione dell'app Intune remota per un account gestito.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);getPolicy
Sezione intitolata “getPolicy”Esegui la fetch della politica di protezione dell'app Intune attualmente efficace per un account gestito.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.getPolicy({} as IntuneMAMUser);groupName
Sezione intitolata “groupName”Aiuto di comodità che risolve il gruppo GroupName valore di configurazione dell'app quando presente.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.groupName({} as IntuneMAMUser);sdkVersion
Sezione intitolata “sdkVersion”Restituisci le versioni native di Intune e MSAL SDK che vengono bundle da questo plugin.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.sdkVersion();displayDiagnosticConsole
Sezione intitolata “displayDiagnosticConsole”Mostra l'interfaccia utente di diagnostica nativa di Intune.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();Riferimento di tipo
Sezione intitolata “Riferimento di tipo”AcquireTokenOptions
Sezione intitolata “AcquireTokenOptions”Opzioni di acquisizione di token interattive.
export interface AcquireTokenOptions { /** * Scopes to request, for example `https://graph.microsoft.com/.default`. */ scopes: string[];
/** * When true, always show the Microsoft account picker or sign-in UI. * * @default false */ forcePrompt?: boolean;
/** * Optional login hint for the interactive sign-in flow. */ loginHint?: string;}IntuneMAMAcquireToken
Sezione intitolata “IntuneMAMAcquireToken”export interface IntuneMAMAcquireToken { accountId: string; accessToken: string; accountIdentifier: string; idToken?: string; username?: string; tenantId?: string; authority?: string;}AcquireTokenSilentOptions
Sezione intitolata “AcquireTokenSilentOptions”Opzioni di acquisizione del token silenzioso.
export interface AcquireTokenSilentOptions { /** * Scopes to request, for example `https://graph.microsoft.com/.default`. */ scopes: string[];
/** * Microsoft Entra object ID returned by `acquireToken` or `enrolledAccount`. */ accountId: string;
/** * When true, bypass the cached access token and request a fresh one. * * @default false */ forceRefresh?: boolean;}RegisterAndEnrollAccountOptions
Sezione intitolata “RegisterAndEnrollAccountOptions”export interface RegisterAndEnrollAccountOptions { /** * Microsoft Entra object ID returned by `acquireToken`. */ accountId: string;}IntuneMAMUser
Sezione intitolata “IntuneMAMUser”export interface IntuneMAMUser { accountId: string; accountIdentifier?: string; username?: string; tenantId?: string; authority?: string;}IntuneMAMAppConfig
Sezione intitolata “IntuneMAMAppConfig”export interface IntuneMAMAppConfig { accountId: string; fullData: Record<string, string>[]; values: Record<string, string>; conflicts: string[];}IntuneMAMPolicy
Sezione intitolata “IntuneMAMPolicy”export interface IntuneMAMPolicy { accountId: string; isPinRequired?: boolean; isManagedBrowserRequired?: boolean; isScreenCaptureAllowed?: boolean; isContactSyncAllowed?: boolean; isAppSharingAllowed?: boolean; isFileEncryptionRequired?: boolean; notificationPolicy?: string;}IntuneMAMGroupName
Sezione intitolata “IntuneMAMGroupName”export interface IntuneMAMGroupName { accountId: string; groupName?: string;}IntuneMAMVersionInfo
Sezione intitolata “IntuneMAMVersionInfo”export interface IntuneMAMVersionInfo { platform: 'ios' | 'android'; intuneSdkVersion: string; msalVersion?: string;}IntuneMAMChangeEvent
Sezione intitolata “IntuneMAMChangeEvent”export interface IntuneMAMChangeEvent { accountId?: string;}Fonte di Verità
Sezione intitolata “Fonte di Verità”Questa pagina è generata dal plugin’s src/definitions.tsRiepiloga la sincronizzazione quando le informazioni pubbliche API cambiano in modo upstream.