Ir al contenido

Inicio

Ventana de terminal
bun add @capgo/capacitor-intune
bunx cap sync
import { IntuneMAM } from '@capgo/capacitor-intune';

acquireToken

Obtener token

Presentar el flujo de inicio de sesión de Microsoft y devolver un token de acceso junto con los metadatos de la cuenta.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);

Obtén un token del caché de MSAL para un usuario que se ha registrado previamente.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);

Registra una cuenta previamente autenticada con Intune y comienza el proceso de inscripción.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);

Pide a Intune que autentique y enrole a un usuario sin solicitar primero un token de aplicación.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();

Devuelve la cuenta de Intune en curso, si está disponible.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.enrolledAccount();

Deshabilitar la cuenta de Intune y desencadenar el borrado selectivo cuando sea aplicable.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({} as IntuneMAMUser);

Cerrar la sesión del usuario en MSAL sin desenrollar la cuenta de Intune.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);

Obtener la configuración de la aplicación remota de Intune para una cuenta administrada.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);

Obtener la política de protección de la aplicación de Intune actualmente efectiva para una cuenta administrada.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.getPolicy({} as IntuneMAMUser);

Ayuda de conveniencia que resuelve el valor de configuración de la aplicación cuando está presente. GroupName Copiar a portapapeles

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.groupName({} as IntuneMAMUser);

Return the native Intune and MSAL SDK versions bundled by this plugin.

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.sdkVersion();

Copiar a portapapeles

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();

Copiar a portapapeles

Referencia de tipos

Opciones interactivas de adquisición de token.

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;
}
export interface IntuneMAMAcquireToken {
accountId: string;
accessToken: string;
accountIdentifier: string;
idToken?: string;
username?: string;
tenantId?: string;
authority?: string;
}

Opciones de adquisición de token silencioso.

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;
}
export interface RegisterAndEnrollAccountOptions {
/**
* Microsoft Entra object ID returned by `acquireToken`.
*/
accountId: string;
}
export interface IntuneMAMUser {
accountId: string;
accountIdentifier?: string;
username?: string;
tenantId?: string;
authority?: string;
}
export interface IntuneMAMAppConfig {
accountId: string;
fullData: Record<string, string>[];
values: Record<string, string>;
conflicts: string[];
}
export interface IntuneMAMPolicy {
accountId: string;
isPinRequired?: boolean;
isManagedBrowserRequired?: boolean;
isScreenCaptureAllowed?: boolean;
isContactSyncAllowed?: boolean;
isAppSharingAllowed?: boolean;
isFileEncryptionRequired?: boolean;
notificationPolicy?: string;
}
export interface IntuneMAMGroupName {
accountId: string;
groupName?: string;
}
export interface IntuneMAMVersionInfo {
platform: 'ios' | 'android';
intuneSdkVersion: string;
msalVersion?: string;
}
export interface IntuneMAMChangeEvent {
accountId?: string;
}

Fuente de verdad

Fuente de Verdad

Esta página se genera a partir del plugin’s src/definitions.ts. Vuelva a ejecutar la sincronización cuando los cambios públicos API cambien en la fuente.

Si está utilizando Inicio para planificar la consola y API operaciones, conecte con Usando @capgo/capacitor-intune para la capacidad nativa en Usando @capgo/capacitor-intune, API Resumen para el detalle de implementación en API Resumen, Introducción para los detalles de implementación en Introducción, API Claves para los detalles de implementación en API Claves, y Dispositivos para los detalles de implementación en Dispositivos.