メインコンテンツにジャンプ
@capgo/capacitor-intune 認証 & セキュリティ オープンソース

Intune Capacitor プラグイン

Capacitor における Microsoft Intune MAM、アプリ保護ポリシー、アプリ設定、および MSAL 認証

インストール

bun add @capgo/capacitor-intune bunx cap sync
npm、pnpm、または yarn
  • npm install @capgo/capacitor-intune
  • pnpm add @capgo/capacitor-intune
  • yarn add @capgo/capacitor-intune

ガイド

How to use Intune in Capacitor

Using @capgo/capacitor-intune

CapacitorはMicrosoft Intune MAM登録、保護ポリシー、設定、MSAL認証のプラグインです。

インストール

bun add @capgo/capacitor-intune
bunx cap sync

bunx cap sync codeのネイティブコードをプロジェクトにコピーします。プラグインのアップグレード後は再度実行してください。

Import

import { IntuneMAM } from '@capgo/capacitor-intune';

APIの概要

Method Description
acquireToken Intuneに以前の認証済みアカウントを登録し、登録プロセスを開始します。
acquireTokenSilent __CAPGO_KEEP_0__
registerAndEnrollAccount __CAPGO_KEEP_1__
loginAndEnrollAccount Capacitor Intune プラグインを使用して、ユーザーを Intune に登録するためにアプリ トークンを要求することなく、Intune を認証してユーザーを登録します。
enrolledAccount 現在登録されている Intune アカウントを取得します。
deRegisterAndUnenrollAccount アカウントを Intune から削除し、適切な場合に選択的削除をトリガーします。
logoutOfAccount MSAL からユーザーをサインアウトしますが、Intune アカウントをアンロールすることはありません。
appConfig 管理アカウントの Intune アプリ構成をリモートから取得します。
getPolicy 管理アカウントの Intune アプリ保護ポリシーを取得します。
groupName アプリ構成値が存在する場合に解決する便利なヘルパーです。 GroupName このプラグインによってバンドルされたネイティブ Intune と MSAL のバージョンを取得します。
sdkVersion IntuneとMSALのネイティブバージョンを含む、このプラグインによってバンドルされたSDK。
displayDiagnosticConsole 例

Examples

acquireToken()

Intune プラグインの例

import { IntuneMAM } from '@capgo/capacitor-intune';

const result = await IntuneMAM.acquireToken({ scopes: ['openid'] });
// The result holds sensitive values: use it without logging it.

acquireTokenSilent()

MSAL キャッシュから前回サインインしたユーザーのトークンを取得します。

import { IntuneMAM } from '@capgo/capacitor-intune';

const result = await IntuneMAM.acquireTokenSilent({
  scopes: ['openid'],
  accountId: 'acquireToken',
});
// The result holds sensitive values: use it without logging it.

registerAndEnrollAccount()

Intuneに登録し、エンロールを開始するために前回認証済みのアカウントを登録します。

import { IntuneMAM } from '@capgo/capacitor-intune';

await IntuneMAM.registerAndEnrollAccount({ accountId: 'account-id-123' });

loginAndEnrollAccount()

Intuneに認証を要求せずにユーザーをエンロールするように求めます。

import { IntuneMAM } from '@capgo/capacitor-intune';

await IntuneMAM.loginAndEnrollAccount();

enrolledAccount()

現在利用可能な Intune アカウントを返します。

import { IntuneMAM } from '@capgo/capacitor-intune';

const result = await IntuneMAM.enrolledAccount();
console.log(result);

deRegisterAndUnenrollAccount()

現在エンロール済みのIntuneアカウントを返します。アカウントが存在する場合。

import { IntuneMAM } from '@capgo/capacitor-intune';

await IntuneMAM.deRegisterAndUnenrollAccount({ accountId: 'account-id-123' });

Intuneからアカウントを登録解除し、適用可能な場合に選択的ワイプをトリガーします。 上の表は、12のコアメソッドをリストしています。リスナーとバージョンヘルパー、各メソッドのフルコントラクトは、以下のGitHubリポジトリにドキュメントされています。.

イベントをリスンします。

addListener ハンドルを返します。画面がアンマウントされたときに呼び出してください、またはリスナーをすべてクリアしてください。 handle.remove() フルリファレンス IntuneMAM.removeAllListeners() Intuneのエンロールを開始します。

Intuneのエンロールをキャンセルします。

@capgo/capacitor-intuneを継続して使用してください。

__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-インテューンを使用しています capgo/capacitor-インテューンを使用して __CAPGO_KEEP_0__/__CAPGO_KEEP_1__-インテューン capgo/capacitor-インテューンの実装詳細 for the implementation detail in @capgo/capacitor-intune, __CAPGO_KEEP_0__/__CAPGO_KEEP_1__-インテューンの実装詳細 __CAPGO_KEEP_0__/__CAPGO_KEEP_1__-ソーシャルログイン @capgo/capacitor-ソーシャルログイン Capacitor Intune プラグインの実装詳細については、@capgo/capacitor-social-login を参照してください。 @capgo/capacitor-パスキー Capacitor Intune プラグインの実装詳細については、@capgo/capacitor-passkey、 @capgo/capacitor-native-biometric Capacitor Intune プラグインの実装詳細については、@capgo/capacitor-native-biometric。

FAQ

IntuneプラグインのFAQ

IntuneプラグインをCapacitorアプリにインストールするにはどうすればいいですか?

「bun add @capgo/capacitor-intune」(または「npm install @capgo/capacitor-intune」)を実行し、次に「bunx cap sync」を実行してiOSとAndroidのプロジェクトがネイティブcodeを取得できるようにします。次に、@capgo/capacitor-intuneをアプリのcodeからインポートしてください。

@capgo/capacitor-intuneはReact、Vue、Angularとどのように動作しますか?

Yes. Intune is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

どのCapacitorバージョンが@capgo/capacitor-intuneをサポートしますか?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

@capgo/capacitor-intuneは無料でオープンソースですか?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-intune/ and the package is free to install from npm. Bug reports and pull requests are welcome.

Intune を使用する code を App Store のレビューなしでアップデートできますか?

プラグインをインストールまたはアップグレードすると、ネイティブ code が変更されるため、新しいストアビルドが必要になります。その後、プラグインを呼び出す JavaScript、HTML、CSS の変更は Capgo のライブアップデートで即時発行できます。

インチューンの変更をアプリレビューの待たずに配信

プラグインがストアビルドに追加されたら、Capgo ライブアップデートにより、ユーザーにJavaScript、HTML、CSSの変更を数分で反映させることができます。

Capgo で始めましょう