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`
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/intune/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.
インストール
Section titled “インストール”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 セットアップを使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の指示に従ってください。
-
パッケージをインストール
ターミナル画面 bun add @capgo/capacitor-intune -
ネイティブ プロジェクトを同期
ターミナル画面 bunx cap sync -
Intuneの完全なネイティブ設定 専用の iOSの設定 と Androidの設定 要件
要件
8+- Capacitor 8+
- Android with Intune Android SDK
12.0.3 - iOS with Intune iOS SDK
21.5.1 - iOS展開対象
17.0+
Ionic’s Intune docs currently call out a January 19, 2026 cutoff for apps built with Xcode 26, requiring Intune iOS SDK 21.1.0+このプラグインはすでに 21.5.1.
基本的な使用方法
「基本的な使用方法」のセクションimport { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.addListener('appConfigChange', (result) => { console.log('App config changed', result.accountId);});
await IntuneMAM.addListener('policyChange', (result) => { console.log('Policy changed', result.accountId);});
const auth = await IntuneMAM.acquireToken({ scopes: ['https://graph.microsoft.com/.default'], loginHint: 'alex@example.com',});
await IntuneMAM.registerAndEnrollAccount({ accountId: auth.accountId,});
const appConfig = await IntuneMAM.appConfig({ accountId: auth.accountId,});
const policy = await IntuneMAM.getPolicy({ accountId: auth.accountId,});
console.log({ auth, appConfig, policy });一般的なフロー
「一般的なフロー」のセクションインタラクティブなサインインとエンロール
「インタラクティブなサインインとエンロール」のセクションconst auth = await IntuneMAM.acquireToken({ scopes: ['https://graph.microsoft.com/.default'],});
await IntuneMAM.registerAndEnrollAccount({ accountId: auth.accountId,});静的トークン更新
Silent token refreshconst token = await IntuneMAM.acquireTokenSilent({ accountId: 'AAD_OBJECT_ID', scopes: ['https://graph.microsoft.com/.default'], forceRefresh: true,});現在登録済みのアカウントを読み取る
現在登録済みのアカウントを読み取るconst user = await IntuneMAM.enrolledAccount();サインアウトまたは選択的に消去
サインアウトまたは選択的に消去await IntuneMAM.logoutOfAccount({ accountId: 'AAD_OBJECT_ID' });await IntuneMAM.deRegisterAndUnenrollAccount({ accountId: 'AAD_OBJECT_ID' });API サマリー
Section titled “API Summary”acquireToken(options)キャッシュされたトークンを読み取る。既存のアカウントの場合に使用します。acquireTokenSilent(options)__CAPGO_KEEP_0__registerAndEnrollAccount(options): Intune と MSAL のアカウントを登録し、登録プロセスをトリガーします。loginAndEnrollAccount(): Intune がログインと登録フローを制御します。appConfig(user): Intune アプリのアカウント設定値を読み取ります。getPolicy(user): Intune アプリ保護ポリシーを読み取ります。groupName(user): 共通GroupName: config ヘルパー値を読み取ります。sdkVersion(): Intune と MSAL のバージョンをインスペクトします。
プラットフォームに関する注意事項
プラットフォームに関する注意事項のセクション- Web はサポートされていません。
- iOS と Android は、Azure の登録、Intune ポリシー割り当て、リダイレクト URI、および特権はアプリ固有です。
cap sync. - iOS と Android は、Azure の登録、Intune ポリシー割り当て、リダイレクト URI、および特権はアプリ固有です。
続けてください
「続けてください」あなたが使用している Getting Started ビジネス運用と移行計画を行うために使用している場合 「@capgo/capacitor-intune」を使用 「@capgo/capacitor-intune」を使用して Capgo Enterprise for the product workflow in Capgo Enterprise, 「__CAPGO_KEEP_0__ Enterprise」 「Ionic Enterprise Plugin Alternatives」 「Capgo Alternatives」 for the product workflow in Capgo Alternatives, and Capgo Consulting for the product workflow in Capgo Consulting.