始め方
このプラグインのインストールステップとフルマークダウンガイドのセットアッププロンプトをコピーする
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.
インストール
「インストール」のセクション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-intune -
ネイティブプロジェクトの同期
ターミナルウィンドウ bunx cap sync -
ネイティブIntuneのセットアップを完了 Intuneの専用 iOSのセットアップ と Androidのセットアップ ページを参照ください。Intuneは、ホストアプリのネイティブ設定、ブローカーアUTH、リダイレクトURI、manifest、エンタイトルメント、MSALの設定が必要です。
要件
要件- Capacitor 8+
- Android(Intune) SDK
12.0.3 - iOS(Intune) SDK
21.5.1 - iOSのデプロイメントターゲット
17.0+
IonicのIntuneドキュメントでは、Xcode 26で構築されたアプリのために、2026年1月19日以降のカットオフを呼び出しています。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,});静的トークン更新
静的トークン更新const 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 Summary
API SummaryacquireToken(options)Microsoftサインインを開始し、トークンとアカウントメタデータを返します。acquireTokenSilent(options)既存のアカウントのキャッシュされたトークンを読み取ります。registerAndEnrollAccount(options)IntuneとMSALアカウントを登録し、エンロールをトリガーします。loginAndEnrollAccount()Intuneがログインとエンロールフローを制御します。appConfig(user)アカウントのIntuneアプリ設定値を読み取ります。getPolicy(user)アカウントのIntuneアプリ保護ポリシーを読み取ります。groupName(user)共通のconfigヘルパー値が存在する場合に読み取ります。GroupNameインストールされているIntuneとMSALバージョンを検査します。sdkVersion()プラットフォームに関する注記
__CAPGO_KEEP_0__
プラットフォームに関する注意事項- Webはサポートされていません。
- iOSとAndroidは両方とも、Azureの登録、Intuneポリシー割り当て、リダイレクトURI、およびエンタイトメントがアプリ固有のものであるため、ネイティブプロジェクトの設定が必要です。
cap sync. - Azureの登録、Intuneポリシー割り当て、リダイレクトURI、およびエンタイトメントはすべてアプリ固有です。
Getting Startedから続けてください。
Getting Startedから続けてください。あなたが使用している場合 Getting Startedを使用して、移行とエンタープライズオペレーションの計画を行い、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intuneに接続してください。 Using @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intuneを使用して、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-intuneのネイティブ機能に接続してください。 Using @capgo/capacitor-intune for the native capability in Using @capgo/capacitor-intune, Capgo Enterprise Capgo Enterpriseの製品ワークフローについて Ionic Enterprise Plugin Alternatives __CAPGO_KEEP_0__ Enterprise Plugin Alternativesの製品ワークフローについて Capgo Alternatives Capgo Alternativesの製品ワークフローについて、 Capgo Consulting Capgo Consultingの製品ワークフローについて。