Zum Inhalt springen

Einstieg

Terminalfenster
bun add @capgo/capacitor-intune
bunx cap sync

Importieren

Importabschnitt
import { IntuneMAM } from '@capgo/capacitor-intune';

Präsentiere das Microsoft-Anmelden und gib einen Zugriffstoken sowie das Benutzerprofil zurück.

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

Ein Token aus der MSAL-Cache für einen zuvor angemeldeten Benutzer abrufen.

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

Ein zuvor authentifiziertes Konto mit Intune registrieren und die Eintragung starten.

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

Intune auffordern, einen Benutzer ohne vorherige Anforderung eines App-Tokens zu authentifizieren und einzutragen.

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

Die derzeit eingetragene Intune-Konto zurückgeben, wenn eines verfügbar ist.

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

Das Konto von Intune deaktivieren und eine selektive Löschung auslösen, wenn zutreffend.

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

Der Benutzer ohne Entfernen des Intune-Kontos aus MSAL abmelden.

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

Die Remote-Intune-App-Konfiguration für ein verwaltetes Konto abrufen.

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

Die derzeit geltende Intune-App-Schutzrichtlinie für ein verwaltetes Konto abrufen.

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

Ein Hilfsprogramm, das den Wert der Anwendungs-Konfiguration auflöst, wenn vorhanden. GroupName Zum Clipboard kopieren

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();

Zum Clipboard kopieren

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

Abschnitt mit dem Titel “Typenverweis”

Abschnitt mit dem Titel “Type Reference”

Interaktive Token-Acquisitioptions.

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;
}

Stille Token-Acquisitioptions.

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;
}

Diese Seite wird aus dem Plugin generiert. src/definitions.ts. Wiederholen Sie die Synchronisierung, wenn die öffentliche API upstream geändert wird.

Wenn Sie " Getting Started zur Planung von Dashboard und API-Operationen verwenden, verbinden Sie es mit Using @capgo/capacitor-intune für die native Fähigkeit in Using @capgo/capacitor-intune, API-Übersicht für die Implementierungsdetails in API-Übersicht, Einführung für die Implementierungsdetails in Einführung API Schlüssel für die Implementierungsdetails in API Schlüssel und Geräte für die Implementierungsdetails in Geräte.