Getting Started
インストール手順とこのプラグインの全マークダウンガイドを含むセットアッププロンプトをコピーします。
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.
インストール
「インストール」というセクションCapgoのAI-Assistedセットアップを使用してプラグインをインストールできます。AIツールにCapgoスキルを追加するには、以下のコマンドを使用してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-pluginsThen use the following prompt:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intune` plugin in my project.If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:
bun add @capgo/capacitor-intunebunx cap syncImport
「Import」セクションimport { IntuneMAM } from '@capgo/capacitor-intune';API の概要
「API の概要」セクションacquireToken
「acquireToken」セクションMicrosoft アカウントにサインインし、認証トークンとアカウントメタデータを取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);acquireTokenSilent
「acquireTokenSilent」セクションMSAL キャッシュから、以前ログインしたユーザーからトークンを取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);registerAndEnrollAccount
「registerAndEnrollAccount」セクションIntuneで以前認証されたアカウントを登録し、エンロールを開始します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);loginAndEnrollAccount
「loginAndEnrollAccount」セクションIntuneにユーザーを認証し、エンロールを開始するように求めます。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();enrolledAccount
「enrolledAccount」セクション現在エンロールされているIntuneアカウントを返します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.enrolledAccount();deRegisterAndUnenrollAccount
__CAPGO_KEEP_1____CAPGO_KEEP_2__
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({} as IntuneMAMUser);logoutOfAccount
__CAPGO_KEEP_3____CAPGO_KEEP_4__
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);appConfig
__CAPGO_KEEP_5____CAPGO_KEEP_0__
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);getPolicy
__CAPGO_KEEP_0____CAPGO_KEEP_0__
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.getPolicy({} as IntuneMAMUser);groupName
「groupName」名のセクション「groupName」名の設定値が存在する場合に、設定値を解決するヘルパー GroupName クリップボードにコピー
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();displayDiagnosticConsole
ネイティブのIntune診断UIを表示します。クリップボードにコピー
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();Type Reference
Type ReferenceAcquireTokenOptions
AcquireTokenOptionsInteractive token acquisition options.
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
Intune MAM Token Acquisitionexport interface IntuneMAMAcquireToken { accountId: string; accessToken: string; accountIdentifier: string; idToken?: string; username?: string; tenantId?: string; authority?: string;}AcquireTokenSilentOptions
AcquireTokenSilentOptionsSilent token acquisition options.
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
Register and Enroll Account Optionsexport interface RegisterAndEnrollAccountOptions { /** * Microsoft Entra object ID returned by `acquireToken`. */ accountId: string;}IntuneMAMUser
Intune MAM Userexport interface IntuneMAMUser { accountId: string; accountIdentifier?: string; username?: string; tenantId?: string; authority?: string;}IntuneMAMAppConfig
「IntuneMAMAppConfig」セクションexport interface IntuneMAMAppConfig { accountId: string; fullData: Record<string, string>[]; values: Record<string, string>; conflicts: string[];}IntuneMAMPolicy
「IntuneMAMPolicy」セクションexport interface IntuneMAMPolicy { accountId: string; isPinRequired?: boolean; isManagedBrowserRequired?: boolean; isScreenCaptureAllowed?: boolean; isContactSyncAllowed?: boolean; isAppSharingAllowed?: boolean; isFileEncryptionRequired?: boolean; notificationPolicy?: string;}IntuneMAMGroupName
「IntuneMAMGroupName」セクションexport interface IntuneMAMGroupName { accountId: string; groupName?: string;}IntuneMAMVersionInfo
「IntuneMAMVersionInfo」セクションexport interface IntuneMAMVersionInfo { platform: 'ios' | 'android'; intuneSdkVersion: string; msalVersion?: string;}IntuneMAMChangeEvent
「IntuneMAMChangeEvent」セクションexport interface IntuneMAMChangeEvent { accountId?: string;}真実の源
ソース オブ トゥルースこのページはプラグインから生成されています。 src/definitions.ts. 公開 API がアップストリームで変更された場合、再度同期を実行してください。
Getting Started から続けてください
Getting Started から続けてくださいあなたが「 Getting Started 」を使用してダッシュボードと API の操作を計画している場合、 Using @capgo/capacitor-intune for the native capability in Using @capgo/capacitor-intune, API Overview for the implementation detail in API Overview, 概要 概要の実装詳細については API キー API キーの実装詳細については デバイス デバイスの実装詳細については