はじめから
インストール手順とこのプラグインの全マークダウン ガイドを含む設定プロンプトをコピーします。
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アシストセットアップを使用してプラグインをインストールできます。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 syncインポート
「インポート」のセクションimport { IntuneMAM } from '@capgo/capacitor-intune';APIの概要
「APIの概要」のセクションacquireToken
「acquireToken」のセクションMicrosoftサインインフローを表示し、アクセストークンとアカウントメタデータを返します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);acquireTokenSilent
acquireTokenSilentMSALキャッシュから前回サインインしたユーザーからトークンを取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);registerAndEnrollAccount
Section titled “registerAndEnrollAccount”Intuneに登録済みのアカウントを登録し、エンロールを開始します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);loginAndEnrollAccount
Section titled “loginAndEnrollAccount”Intuneに認証を求めずにアプリトークンを要求する前に、ユーザーをエンロールするように求める
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();enrolledAccount
Section titled “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とMSALSDKバージョンを返します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.sdkVersion();displayDiagnosticConsole
診断コンソールの表示ネイティブのIntune診断UIを表示します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();型の参照
型の参照のセクションAcquireTokenOptions
Section titled “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
Section titled “IntuneMAMAcquireToken”export interface IntuneMAMAcquireToken { accountId: string; accessToken: string; accountIdentifier: string; idToken?: string; username?: string; tenantId?: string; authority?: string;}AcquireTokenSilentOptions
Section titled “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
Section titled “RegisterAndEnrollAccountOptions”export interface RegisterAndEnrollAccountOptions { /** * Microsoft Entra object ID returned by `acquireToken`. */ accountId: string;}IntuneMAMUser
Section titled “IntuneMAMUser”export interface IntuneMAMUser { accountId: string; accountIdentifier?: string; username?: string; tenantId?: string; authority?: string;}IntuneMAMAppConfig
Intune MAM アプリ構成export interface IntuneMAMAppConfig { accountId: string; fullData: Record<string, string>[]; values: Record<string, string>; conflicts: string[];}IntuneMAMPolicy
Intune MAM ポリシーexport interface IntuneMAMPolicy { accountId: string; isPinRequired?: boolean; isManagedBrowserRequired?: boolean; isScreenCaptureAllowed?: boolean; isContactSyncAllowed?: boolean; isAppSharingAllowed?: boolean; isFileEncryptionRequired?: boolean; notificationPolicy?: string;}IntuneMAMGroupName
Intune MAM グループ名export interface IntuneMAMGroupName { accountId: string; groupName?: string;}IntuneMAMVersionInfo
Intune MAM バージョン情報export interface IntuneMAMVersionInfo { platform: 'ios' | 'android'; intuneSdkVersion: string; msalVersion?: string;}IntuneMAMChangeEvent
Intune MAM イベント変更export interface IntuneMAMChangeEvent { accountId?: string;}真実の源
真実の源このページはプラグインから生成されます。 src/definitions.ts. upstreamのpublic APIが変更されたときは、再度syncを実行してください。
Getting Startedから続けてください。
Getting Startedから続けてください。あなたが「Getting Started」を使用して、ダッシュボードと__CAPGO_KEEP_0__の操作を計画している場合、 Getting Started to plan dashboard and API operations, connect it with Using @capgo/capacitor-intune Using @capgo/capacitor-intune API Overview API Overview Introduction 導入の実装詳細について API キー API キーについての実装詳細、 デバイス デバイスについての実装詳細。