Personna __CAPGO_KEEP_0__
Copiez une commande de configuration avec les étapes d'installation et la guide markdown complet pour ce 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.
Installez
Section intitulée « Installez »Vous pouvez utiliser notre configuration assistée par l'IA pour installer le plugin. Ajoutez les Capgo compétences à votre outil IA à l'aide de la commande suivante :
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsUtilisez ensuite la commande suivante :
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intune` plugin in my project.Si vous préférez la configuration manuelle, installez le plugin en exécutant les commandes suivantes et suivez les instructions spécifiques à votre plateforme ci-dessous :
bun add @capgo/capacitor-intunebunx cap syncImporter
Section intitulée « Importer »import { IntuneMAM } from '@capgo/capacitor-intune';API : Présentation
API : PrésentationacquireToken
Section intitulée “acquireToken”Présenter le flux de connexion Microsoft et retourner un jeton d'accès ainsi que les métadonnées du compte.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);acquireTokenSilent
Section intitulée “acquireTokenSilent”Obtenir un jeton à partir du cache MSAL pour un utilisateur déjà connecté.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);registerAndEnrollAccount
Section intitulée “registerAndEnrollAccount”Inscrire un compte précédemment authentifié avec Intune et démarrer l'enregistrement.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);loginAndEnrollAccount
Section intitulée “loginAndEnrollAccount”Demander à Intune de s'authentifier et d'enregistrer un utilisateur sans demander d'abord un jeton d'application.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();enrolledAccount
Section intitulée “compteEnrôlé”Renvoyez le compte Intune actuellement enrôlé, si l'un est disponible.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.enrolledAccount();deRegisterAndUnenrollAccount
Section intitulée “déEnrôlerEtDéEnrôlerCompte”Désenrôler le compte de Intune et déclencher un effacement sélectif lorsqu'il est applicable.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({} as IntuneMAMUser);logoutOfAccount
Section intitulée “déconnexionDuCompte”Signez l'utilisateur hors de MSAL sans déenrôler le compte Intune.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);Récupérez la configuration d'application Intune distante pour un compte géré.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);getPolicy
Section intitulée “getPolicy”Récupérez la politique d'applications Intune actuellement en vigueur pour un compte géré.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.getPolicy({} as IntuneMAMUser);groupName
Section intitulée “groupName”Outil de commodité qui résout la valeur de configuration de l'application lorsque celle-ci est présente. GroupName Copier dans le presse-papier
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.groupName({} as IntuneMAMUser);sdkVersion
Renvoyez les versions natives d'Intune et de MSAL __CAPGO_KEEP_0__ encapsulées par ce plugin.Return the native Intune and MSAL SDK versions bundled by this plugin.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.sdkVersion();displayDiagnosticConsole
Affichez l'interface utilisateur de diagnostics native d'Intune.Section intitulée “displayDiagnosticConsole”
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();Référence de type
Section intitulée « Référence de type »AcquireTokenOptions
Section intitulée « Options d'acquisition de jeton »Options interactives d'acquisition de jeton.
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
Section intitulée « Acquérir un jeton Intune MAM »export interface IntuneMAMAcquireToken { accountId: string; accessToken: string; accountIdentifier: string; idToken?: string; username?: string; tenantId?: string; authority?: string;}AcquireTokenSilentOptions
Section intitulée « Options d'acquisition de jeton silencieux »Options d'acquisition de jeton silencieux.
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
Section intitulée « Options d'enregistrement et d'enregistrement du compte »export interface RegisterAndEnrollAccountOptions { /** * Microsoft Entra object ID returned by `acquireToken`. */ accountId: string;}IntuneMAMUser
Section intitulée « Utilisateur IntuneMAM »export interface IntuneMAMUser { accountId: string; accountIdentifier?: string; username?: string; tenantId?: string; authority?: string;}IntuneMAMAppConfig
Section intitulée « Configuration d’application IntuneMAM »export interface IntuneMAMAppConfig { accountId: string; fullData: Record<string, string>[]; values: Record<string, string>; conflicts: string[];}IntuneMAMPolicy
Section intitulée « Politique IntuneMAM »export interface IntuneMAMPolicy { accountId: string; isPinRequired?: boolean; isManagedBrowserRequired?: boolean; isScreenCaptureAllowed?: boolean; isContactSyncAllowed?: boolean; isAppSharingAllowed?: boolean; isFileEncryptionRequired?: boolean; notificationPolicy?: string;}IntuneMAMGroupName
Section intitulée « Groupe IntuneMAM »export interface IntuneMAMGroupName { accountId: string; groupName?: string;}IntuneMAMVersionInfo
Section intitulée « Informations de version IntuneMAM »export interface IntuneMAMVersionInfo { platform: 'ios' | 'android'; intuneSdkVersion: string; msalVersion?: string;}IntuneMAMChangeEvent
Section intitulée « Événement de changement IntuneMAM »export interface IntuneMAMChangeEvent { accountId?: string;}Source De Vérité
Section intitulée « Source De Vérité »Cette page est générée à partir du plugin’s src/definitions.tsRe-faire la synchronisation lorsque les modifications publiques API se produisent en amont.
Continuez de là pour Getting Started
Section intitulée « Continuez de là pour Getting Started »Si vous utilisez Getting Started pour planifier le tableau de bord et les opérations API, connectez-l’avec Utiliser @capgo/capacitor-intune pour la capacité native dans Utiliser @capgo/capacitor-intune, API Présentation pour les détails d'implémentation dans API Présentation Introduction pour les détails d'implémentation dans Introduction API Clés pour les détails d'implémentation dans API Clés, et Appareils pour les détails d'implémentation dans Appareils.