Iniziare
Copia una richiesta di configurazione 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âPuoi utilizzare la nostra configurazione assistita dall'IA per installare il plugin. Aggiungi le Capgo abilitĂ al tuo strumento di IA utilizzando il seguente comando:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsPoi utilizza il seguente prompt:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intune` plugin in my project.Se preferisci l'installazione manuale, installa il plugin eseguendo i seguenti comandi e segui le istruzioni specifiche per la piattaforma riportate di seguito:
bun add @capgo/capacitor-intunebunx cap syncimport { IntuneMAM } from '@capgo/capacitor-intune';API Panoramica
Sezione intitolata âAPI PanoramicaâacquireToken
Sezione intitolata âacquireTokenâPresenta il flusso di accesso Microsoft e restituisci un token di accesso piĂš i metadati dell'account.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);acquireTokenSilent
Sezione intitolata âacquireTokenSilentâOttenere un token dal cache MSAL per un utente precedentemente acceduto.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);registerAndEnrollAccount
Sezione intitolata âregisterAndEnrollAccountâRegistrare un account precedentemente autenticato con Intune e avviare l'iscrizione.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);loginAndEnrollAccount
Sezione intitolata âloginAndEnrollAccountâChiedere a Intune di autenticare e iscrivere un utente senza richiedere prima un token dell'applicazione.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();enrolledAccount
Sezione intitolata âenrolledAccountâRestituire l'account Intune correntemente iscritto, se disponibile.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.enrolledAccount();deRegisterAndUnenrollAccount
Sezione intitolata âdeRegisterAndUnenrollAccountâDeregistrazione dell'account da Intune e attivazione dello svuotamento selettivo quando applicabile.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({} as IntuneMAMUser);logoutOfAccount
Sezione intitolata âlogoutOfAccountâEffettuare il logout dell'utente da MSAL senza svincolare l'account Intune.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);appConfig
Sezione intitolata âappConfigâEstrarre la configurazione dell'applicazione Intune remota per un account gestito.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);getPolicy
Sezione intitolata âgetPolicyâEstrarre la politica di protezione dell'applicazione 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 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 sono state 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 di token silenziose.
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 âConfigurazione dell'app di IntuneMAMâexport interface IntuneMAMAppConfig { accountId: string; fullData: Record<string, string>[]; values: Record<string, string>; conflicts: string[];}IntuneMAMPolicy
Sezione intitolata âPolitica di IntuneMAMâexport interface IntuneMAMPolicy { accountId: string; isPinRequired?: boolean; isManagedBrowserRequired?: boolean; isScreenCaptureAllowed?: boolean; isContactSyncAllowed?: boolean; isAppSharingAllowed?: boolean; isFileEncryptionRequired?: boolean; notificationPolicy?: string;}IntuneMAMGroupName
Sezione intitolata âNome del gruppo di IntuneMAMâexport interface IntuneMAMGroupName { accountId: string; groupName?: string;}IntuneMAMVersionInfo
Sezione intitolata âInformazioni sulla versione di IntuneMAMâexport interface IntuneMAMVersionInfo { platform: 'ios' | 'android'; intuneSdkVersion: string; msalVersion?: string;}IntuneMAMChangeEvent
Sezione intitolata âEvento di modifica di IntuneMAMâexport interface IntuneMAMChangeEvent { accountId?: string;}Fonte di veritĂ
Sezione intitolata âFonte di VeritĂ âQuesta pagina è generata dal pluginâs src/definitions.ts. Riavvia la sincronizzazione quando il pubblico API cambia upstream.
Continua da Iniziare
Sezione intitolata âContinua da IniziareâSe stai utilizzando Iniziare per pianificare dashboard e API operazioni, connettilo con Usando @capgo/capacitor-intune per la capacitĂ nativa in Usando @capgo/capacitor-intune, API Overview per i dettagli di implementazione in API Overview, Introduzione per i dettagli di implementazione in Introduzione, API Chiavi per i dettagli di implementazione in API Chiavi, e Dispositivi per i dettagli di implementazione in Dispositivi.