はじめに
このプラグインのインストール手順と完全なマークダウンガイドを含むセットアップコマンドをコピーしてください。
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.
インストール
インストールbun add @capgo/capacitor-intunebunx cap syncインポート
「インポート」セクション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
アカウントからログアウトするセクションMSALからユーザーをサインアウトするが、Intuneアカウントをアンメンバーにすることはありません。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);appConfig
アプリ設定のセクション管理されたアカウントのためのリモートIntuneアプリ設定を取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);getPolicy
アプリ保護ポリシー管理されたアカウントのための現在の有効なIntuneアプリ保護ポリシーを取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.getPolicy({} as IntuneMAMUser);groupName
グループ名のセクションIntuneグループ名を解決するための便利なヘルパー 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
「診断コンソールを表示」ネイティブのIntune診断UIを表示します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();型参照
「型参照」のセクションAcquireTokenOptions
「トークン取得オプション」のセクションインタラクティブなトークン取得オプション。
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
「IntuneMAMAcquireToken」セクションexport interface IntuneMAMAcquireToken { accountId: string; accessToken: string; accountIdentifier: string; idToken?: string; username?: string; tenantId?: string; authority?: string;}AcquireTokenSilentOptions
「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
「RegisterAndEnrollAccountOptions」セクションexport interface RegisterAndEnrollAccountOptions { /** * Microsoft Entra object ID returned by `acquireToken`. */ accountId: string;}IntuneMAMUser
「IntuneMAMUser」セクション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
IntuneMAMポリシーセクションexport interface IntuneMAMPolicy { accountId: string; isPinRequired?: boolean; isManagedBrowserRequired?: boolean; isScreenCaptureAllowed?: boolean; isContactSyncAllowed?: boolean; isAppSharingAllowed?: boolean; isFileEncryptionRequired?: boolean; notificationPolicy?: string;}IntuneMAMGroupName
IntuneMAMグループ名セクションexport interface IntuneMAMGroupName { accountId: string; groupName?: string;}IntuneMAMVersionInfo
IntuneMAMバージョン情報セクションexport interface IntuneMAMVersionInfo { platform: 'ios' | 'android'; intuneSdkVersion: string; msalVersion?: string;}IntuneMAMChangeEvent
IntuneMAMイベント変更セクションexport interface IntuneMAMChangeEvent { accountId?: string;}真実の源
真実の源セクションこのページはプラグインから生成されます。 src/definitions.tsパブリックAPIがアップストリームで変更された場合に再度同期を実行してください。