Pemula
Copy prompt pengaturan dengan langkah instalasi dan panduan markdown lengkap untuk plugin ini.
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.
Bab yang berjudul “Instal”
Anda dapat menggunakan Setup Bantuan AI untuk menginstal plugin. Tambahkan __CAPGO_KEEP_0__ kemampuan ke alat AI Anda menggunakan perintah berikut:You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsKemudian gunakan prompt berikut:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intune` plugin in my project.Jika Anda lebih suka Setup Manual, instal plugin dengan menjalankan perintah-perintah berikut dan ikuti instruksi spesifik platform di bawah:
bun add @capgo/capacitor-intunebunx cap syncImport
Bab berjudul “Import”import { IntuneMAM } from '@capgo/capacitor-intune';Ringkasan API
Bab berjudul “Ringkasan API”acquireToken
Bagian berjudul “acquireToken”Tampilkan alur masuk Microsoft dan kembalikan token akses beserta metadata akun.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);acquireTokenSilent
Bagian berjudul “acquireTokenSilent”Dapatkan token dari cache MSAL untuk pengguna yang telah masuk sebelumnya.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);registerAndEnrollAccount
Bagian berjudul “registerAndEnrollAccount”Daftarkan akun yang telah diotentikasi sebelumnya dengan Intune dan mulai proses pendaftaran.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);loginAndEnrollAccount
Bagian berjudul “loginAndEnrollAccount”Tanyakan kepada Intune untuk melakukan autentikasi dan pendaftaran pengguna tanpa meminta token aplikasi terlebih dahulu.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();enrolledAccount
Judul Bagian “akunTerdaftar”Mengembalikan akun Intune yang saat ini terdaftar, jika tersedia.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.enrolledAccount();deRegisterAndUnenrollAccount
Judul Bagian “deRegisterDanUnenrollAkun”Menghapus akun dari Intune dan mengaktifkan wipe selektif ketika berlaku.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({} as IntuneMAMUser);logoutOfAccount
Judul Bagian “keluarDariAkun”Mengeluarkan pengguna dari MSAL tanpa mengunenroll akun Intune.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);appConfig
Judul Bagian “konfigurasiAplikasi”Mengambil konfigurasi aplikasi Intune remote untuk akun yang di-manage.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);getPolicy
Judul Bagian “getPolicy”Fetch kebijakan aplikasi Intune yang berlaku saat ini untuk akun yang diatur.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.getPolicy({} as IntuneMAMUser);groupName
Judul Bagian “groupName”Bantuan kenyamanan yang menyelesaikan nilai konfigurasi aplikasi ketika ada. GroupName Salin ke clipboard
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.groupName({} as IntuneMAMUser);sdkVersion
Kembalikan versi native Intune dan MSAL __CAPGO_KEEP_0__ yang diintegrasikan oleh plugin ini.Return the native Intune and MSAL SDK versions bundled by this plugin.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.sdkVersion();displayDiagnosticConsole
Tampilkan UI diagnostik native Intune.Salin ke clipboard
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();Referensi Tipe
Bab berjudul “Referensi Tipe”AcquireTokenOptions
Bab berjudul “AcquireTokenOptions”Opsi pengambilan token interaktif.
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
Bab berjudul “IntuneMAMAcquireToken”export interface IntuneMAMAcquireToken { accountId: string; accessToken: string; accountIdentifier: string; idToken?: string; username?: string; tenantId?: string; authority?: string;}AcquireTokenSilentOptions
Bab berjudul “AcquireTokenSilentOptions”Opsi pengambilan token diam.
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
Bab berjudul “RegisterAndEnrollAccountOptions”export interface RegisterAndEnrollAccountOptions { /** * Microsoft Entra object ID returned by `acquireToken`. */ accountId: string;}IntuneMAMUser
Judul bagian “IntuneMAMUser”export interface IntuneMAMUser { accountId: string; accountIdentifier?: string; username?: string; tenantId?: string; authority?: string;}IntuneMAMAppConfig
Judul bagian “IntuneMAMAppConfig”export interface IntuneMAMAppConfig { accountId: string; fullData: Record<string, string>[]; values: Record<string, string>; conflicts: string[];}IntuneMAMPolicy
Judul bagian “IntuneMAMPolicy”export interface IntuneMAMPolicy { accountId: string; isPinRequired?: boolean; isManagedBrowserRequired?: boolean; isScreenCaptureAllowed?: boolean; isContactSyncAllowed?: boolean; isAppSharingAllowed?: boolean; isFileEncryptionRequired?: boolean; notificationPolicy?: string;}IntuneMAMGroupName
Judul bagian “IntuneMAMGroupName”export interface IntuneMAMGroupName { accountId: string; groupName?: string;}IntuneMAMVersionInfo
Judul bagian “IntuneMAMVersionInfo”export interface IntuneMAMVersionInfo { platform: 'ios' | 'android'; intuneSdkVersion: string; msalVersion?: string;}IntuneMAMChangeEvent
Judul bagian “IntuneMAMChangeEvent”export interface IntuneMAMChangeEvent { accountId?: string;}Sumber Kebenaran
Judul Bagian “Sumber Kebenaran”Halaman ini dihasilkan dari plugin’s src/definitions.tsRe-run sinkronisasi ketika API publik berubah di atas
Lanjutkan dari Getting Started
Judul Bagian “Lanjutkan dari Getting Started”Jika Anda menggunakan Getting Started untuk merencanakan dashboard dan API operasi, hubungkannya dengan Menggunakan @capgo/capacitor-intune untuk kemampuan asli di Menggunakan @capgo/capacitor-intune, API Pengenalan untuk detail implementasi di API Pengenalan, Pendahuluan untuk detail implementasi di Pendahuluan, API Kunci untuk detail implementasi di API Kunci, dan Perangkat untuk detail implementasi di Perangkat.