始め方
インストールステップとこのプラグインのフルマークダウンガイドを含むセットアップ用の質問をコピー可能な形式で取得
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.
-
パッケージをインストール
ターミナル画面 bun add @capgo/capacitor-intune -
ネイティブプロジェクトを同期
ターミナル画面 bunx cap sync -
Intune設定を完全にネイティブに設定 Cloudflareの「Dedicated iOS setup」と「Dedicated Android setup」のページを参照してください。 iOS設定 、 Android設定 、
Intuneには、brokered auth、redirect URI、manifest、エンタイトルメント、MSAL設定のためのホストアプリのネイティブ設定が必要です。
要件- Capacitor 8+
- SDK 8+
12.0.3 - Intune Android SDK
21.5.1 - Intune iOS __CAPGO_KEEP_0__の場合のiOSのデプロイメントターゲット
17.0+
IonicのIntuneドキュメントは現在、Xcode 26で構築されたアプリに対して2026年1月19日をカットオフ日として呼び出しています。Intune iOS SDK 21.1.0+. このプラグインはすでに 21.5.1.
Basic Usage
基本的な使用方法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 });Common Flows
セクション「Common Flows」Interactive sign-in and enrollment
セクション「Interactive sign-in and enrollment」const auth = await IntuneMAM.acquireToken({ scopes: ['https://graph.microsoft.com/.default'],});
await IntuneMAM.registerAndEnrollAccount({ accountId: auth.accountId,});Silent token refresh
セクション「Silent token refresh」const token = await IntuneMAM.acquireTokenSilent({ accountId: 'AAD_OBJECT_ID', scopes: ['https://graph.microsoft.com/.default'], forceRefresh: true,});__CAPGO_KEEP_0__のアカウントを読みます。
「__CAPGO_KEEP_0__のアカウントを読みます。」というセクションconst user = await IntuneMAM.enrolledAccount();サインアウトまたは選択的に消去
「サインアウトまたは選択的に消去」というセクションawait IntuneMAM.logoutOfAccount({ accountId: 'AAD_OBJECT_ID' });await IntuneMAM.deRegisterAndUnenrollAccount({ accountId: 'AAD_OBJECT_ID' });APIの概要
「APIの概要」というセクションacquireToken(options)Microsoftサインインを開始し、トークンとアカウントメタデータを返します。acquireTokenSilent(options)既存のアカウントのキャッシュされたトークンを読みます。registerAndEnrollAccount(options)IntuneでMSALアカウントを登録し、エンロールをトリガーします。loginAndEnrollAccount(): Intuneでログインとエンロールフローを制御する。appConfig(user): Intuneアプリの設定値をアカウントに読み取ります。getPolicy(user): Intuneアプリ保護ポリシーをアカウントに読み取ります。groupName(user): 共通のconfigヘルパー値を取得します。GroupName: IntuneとMSALのバンドルバージョンを表示します。sdkVersion()プラットフォームに関する注意
プラットフォームに関する注意
Webはサポートされていません。- iOSとAndroidは、Azureの登録、Intuneポリシー割り当て、リダイレクトURI、およびエンタイトメントはアプリ固有です。
- Getting Startedから続けてください。
cap sync. - : Intuneでログインとエンロールフローを制御する。
: Intuneアプリの設定値をアカウントに読み取ります。
「Getting Started」から続けてください__CAPGO_KEEP_0__を使用している場合 Getting Started 企業運用やマイグレーションの計画に使用する場合、__CAPGO_KEEP_0__を接続してください 「@capgo/capacitor-intune」を使用 「@capgo/capacitor-intune」のネイティブ機能 Capgo Enterprise 「Capgo Enterprise」の製品ワークフロー Ionic Enterprise Plugin Alternatives 「Ionic Enterprise Plugin Alternatives」の製品ワークフロー Capgo Alternatives 「Capgo Alternatives」の製品ワークフロー Capgo Consulting Capgo の製品ワークフロー向け