__CAPGO_KEEP_0__アプリにMicrosoft Intune MAM、ポリシー、アプリ設定、MSALのサポートをインストールして使用します。 - __CAPGO_KEEP_0__アプリのリアルタイムの更新管理を行うことができます。

はじめに

GitHub

CapgoのAI-Assisted Setupを使用してプラグインをインストールできます。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を使用する場合は、以下のコマンドを実行してプラグインをインストールし、以下のプラットフォーム固有の手順に従ってください。

  1. パッケージをインストール

    ターミナル画面
    bun add @capgo/capacitor-intune
  2. ネイティブプロジェクトを同期

    ターミナル画面
    bunx cap sync
  3. ネイティブIntuneセットアップを完了 Intuneを使用したCapgoの設定 iOSの設定 と Androidの設定 ページ

要件

要件
  • Capacitor 8+
  • Android with Intune Android SDK 12.0.3
  • iOS with Intune iOS 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' });
  • acquireToken(options): Microsoft サインインを開始し、トークンとアカウント メタデータを返します。
  • acquireTokenSilent(options): 既存のアカウントのキャッシュされたトークンを読み取ります。
  • 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、およびエンタイトメントはアプリ固有です。
  • 続けて "Getting Started" から進みます。 cap sync.
  • 「続けて "Getting Started" から進みます。」のセクション

もしCapgoを使用している場合 はじめに マイグレーションとエンタープライズオペレーションの計画に役立つように、接続する Using @capgo/capacitor-intune for the native capability in Using @capgo/capacitor-intune Capgo 企業版 Capgoの製品ワークフローについては、Capgo Enterpriseに従います。 for the product workflow in Capgo Enterprise Ionic Enterprise Plugin Alternatives Capgo の代替方法 Capgoの製品ワークフローについてはCapgo Alternativesにあります。 Capgo コンサルティング Capgoの製品ワークフローについて