スタートガイド
このプラグインのインストール手順とマークダウンガイドを含むセットアップのコピー用テキストをコピーします。
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.
Install
「インストール」のセクション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 syncインポート
__CAPGO_KEEP_0__の概要import { IntuneMAM } from '@capgo/capacitor-intune';APIの概要
APIガイドacquireToken
セクションMicrosoftサインインフローを提示し、トークンとアカウントメタデータを返します。
import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.acquireToken({ scopes: ['openid'] });// The result holds sensitive values: use it without logging it.acquireTokenSilent
「acquireTokenSilent」セクション以前のサインインユーザーからMSALキャッシュからトークンを取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.acquireTokenSilent({ scopes: ['openid'], accountId: 'acquireToken',});// The result holds sensitive values: use it without logging it.registerAndEnrollAccount
「registerAndEnrollAccount」セクションIntuneで以前の認証済みアカウントを登録し、エンロールを開始します。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({ accountId: 'account-id-123' });loginAndEnrollAccount
「loginAndEnrollAccount」セクションIntuneにアプリケーション トークンを要求せずにユーザーを認証してエンロールするように求めます。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();enrolledAccount
「enrolledAccount」セクション現在のIntuneアカウントを返します。利用可能な場合。
import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.enrolledAccount();console.log(result);deRegisterAndUnenrollAccount
脱会アカウントアカウントをIntuneから削除し、適切な場合に選択的削除をトリガーします。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({ accountId: 'account-id-123' });logoutOfAccount
アカウントからログアウトMSALからユーザーをサインアウトしますが、Intuneアカウントを脱会させません。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({ accountId: 'account-id-123' });appConfig
アプリ設定管理されたアカウントのためのリモートIntuneアプリ設定を取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.appConfig({ accountId: 'account-id-123' });console.log(result);getPolicy
ポリシーを取得現在の有効な Intune アプリ保護ポリシーを取得します。
import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.getPolicy({ accountId: 'account-id-123' });console.log(result);groupName
「{groupName}」アプリの設定値を解決する便利なヘルパーです。 GroupName 「{sdkVersion}」
import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.groupName({ accountId: 'account-id-123' });console.log(result);IntuneとMSALのネイティブバージョンをこのプラグインでバンドルされたSDKを返します。
import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.sdkVersion();console.log(result);displayDiagnosticConsole
ネイティブの Intune の診断 UI を表示します。コピー
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();リファレンス
「リファレンス」のセクションAcquireTokenOptions
「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
Intune MAM ユーザーexport interface IntuneMAMUser { accountId: string; accountIdentifier?: string; username?: string; tenantId?: string; authority?: string;}IntuneMAMAppConfig
コピー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公開 API がアップストリームで変更されたときは、再度同期を実行してください。
続けてGetting Started
「続けてGetting Started」Capacitor を使用している場合 スタートガイド ダッシュボードと API の計画と実行を計画するには、Capacitor を使用してください。 @capgo/capacitor-Intuneを使用 Using @capgo/capacitor-intune API の概要 APIの実装詳細については 概要 __CAPGO_KEEP_0__の実装詳細については APIのキー APIのキーについて、 デバイス デバイスの実装詳細のために。