Install and use Microsoft Intune MAM, policy, app config, and MSAL support in your __CAPGO_KEEP_0__ app. - Manage updates in realtime for your __CAPGO_KEEP_1__ app without __CAPGO_KEEP_2__.

Getting Started

GitHub

CapgoのAIアシストセットアップを使用してプラグインをインストールできます。次のコマンドを使用して、CapgoスキルをAIツールに追加してください。

ターミナルウィンドウ
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のネイティブ設定を完了 専用の iOSの設定Androidの設定 ページ

  • Capacitor 8+
  • Android with Intune Android SDK 12.0.3
  • iOS with Intune iOS SDK 21.5.1
  • 設定要件 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,
});

静的トークン更新

「静的トークン更新」
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)MSAL アカウントを Intune と登録し、登録をトリガーします。
  • loginAndEnrollAccount(): Intuneでログインとエンロールのフローを制御してください。
  • appConfig(user): Intuneアプリの設定値をアカウントから読み取ります。
  • getPolicy(user): Intuneアプリの保護ポリシーをアカウントから読み取ります。
  • groupName(user): 共通 GroupName config ヘルパー値が存在する場合に読み取ります。
  • sdkVersion(): IntuneとMSALのバンドルバージョンをインスペクトします。

プラットフォームに関する注意

「プラットフォームに関する注意」セクション
  • Webはサポートされていません。
  • iOSとAndroidは両方とも、Azureの登録、Intuneポリシー割り当て、リダイレクトURI、エンタイトメントなど、ネイティブプロジェクトの設定が必要です。 cap sync.
  • Azureの登録、Intuneポリシー割り当て、リダイレクトURI、エンタイトメントなど、ネイティブプロジェクトの設定が必要です。

続けて「Getting Started」から進みます。

Section titled “Getting Startedから続けて”

あなたが使用している Getting Started をエンタープライズオペレーションと移行計画に利用している場合、 Using @capgo/capacitor-intune capgo-intune/capacitor Capgo Enterprise Capgo Enterprise __CAPGO_KEEP_0__ Enterprise の製品ワークフローを使用する Capgo Alternatives for the product workflow in Capgo Alternatives, and Capgo Consulting Capgo Consultingの製品ワークフロー