Skip to content

始め方

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

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

    ターミナル画面
    bunx cap sync
  3. 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.

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): 共通の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 の製品ワークフロー向け