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.
インストール
「インストール」のセクションAI-Assisted セットアップを使用してプラグインをインストールできます。AI ツールに Capgo スキルを追加するには、以下のコマンドを実行してください。
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用してください:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-intune` plugin in my project.Manual Setup を使用する場合は、次のコマンドを実行して、以下のプラットフォーム固有の指示に従ってプラグインをインストールしてください。
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
セクション “deRegisterAndUnenrollAccount”Intune からアカウントを削除し、適用可能な場合に選択的削除をトリガーします。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({} as IntuneMAMUser);logoutOfAccount
セクション “logoutOfAccount”MSAL からユーザーをサインアウトし、Intune アカウントをアンロールせずにします。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);appConfig
セクション “appConfig”管理されたアカウントのためにリモートの Intune アプリ構成を取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);getPolicy
セクション “getPolicy”管理されたアカウントのために現在有効な Intune アプリ保護ポリシーを取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.getPolicy({} as IntuneMAMUser);groupName
グループ名のセクションアプリの設定値を解決する便利なヘルパーです。 GroupName 存在する場合のアプリの設定値を解決します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.groupName({} as IntuneMAMUser);sdkVersion
SDK バージョン名のセクションこのプラグインによってバンドルされたネイティブのIntuneとMSALのSDKバージョンを返します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.sdkVersion();displayDiagnosticConsole
診断コンソールを表示する診断コンソールを表示します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();型の参照
種類の参照AcquireTokenOptions
Intune MAM の取得オプションインタラクティブなトークン取得オプション
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 の取得export interface IntuneMAMAcquireToken { accountId: string; accessToken: string; accountIdentifier: string; idToken?: string; username?: string; tenantId?: string; authority?: string;}AcquireTokenSilentOptions
静的トークン取得オプションクリップボードにコピー
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
クリップボードにコピーexport interface RegisterAndEnrollAccountOptions { /** * Microsoft Entra object ID returned by `acquireToken`. */ accountId: string;}IntuneMAMUser
Intune MAM のユーザーexport 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」から続けてください。Capacitor を使用している場合、 「Getting Started」から続けてください。 ダッシュボードと API の操作を計画するには、Capacitor を接続してください。 Capacitor を使用して、@capgo/capacitor-intune を使用して、ネイティブ機能を実装してください。 Capacitor を使用して、@capgo/capacitor-intune の実装詳細を capgo Overview に表示してください。 API の概要を表示してください。 for the implementation detail in API Overview, 概要 概要の実装詳細については API キー API キーの実装詳細については デバイス デバイスの実装詳細については