__CAPGO_KEEP_3__

スタートガイド

GitHub

AI-Assisted セットアップを使用してプラグインをインストールできます。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
import { IntuneMAM } from '@capgo/capacitor-intune';

APIの概要

APIガイド

acquireToken

セクション

Microsoftサインインフローを提示し、トークンとアカウントメタデータを返します。

import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.acquireToken({ scopes: ['openid'] });
// The result holds sensitive values: use it without logging it.

以前のサインインユーザーから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.

Intuneで以前の認証済みアカウントを登録し、エンロールを開始します。

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({ accountId: 'account-id-123' });

Intuneにアプリケーション トークンを要求せずにユーザーを認証してエンロールするように求めます。

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();

現在の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' });

MSALからユーザーをサインアウトしますが、Intuneアカウントを脱会させません。

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({ accountId: 'account-id-123' });

管理されたアカウントのためのリモートIntuneアプリ設定を取得します。

import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.appConfig({ accountId: 'account-id-123' });
console.log(result);

現在の有効な Intune アプリ保護ポリシーを取得します。

import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.getPolicy({ accountId: 'account-id-123' });
console.log(result);

アプリの設定値を解決する便利なヘルパーです。 GroupName 「{sdkVersion}」

import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.groupName({ accountId: 'account-id-123' });
console.log(result);

IntuneとMSALのネイティブバージョンをこのプラグインでバンドルされたSDKを返します。

import { IntuneMAM } from '@capgo/capacitor-intune';
const result = await IntuneMAM.sdkVersion();
console.log(result);

コピー

import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();

トークン取得のオプション

export interface AcquireTokenOptions {
/**
* Scopes to request, for example `https://graph.microsoft.com/.default`.
*/
scopes: string[];
/**
* When true, always show the Microsoft account picker or sign-in UI.
*
* @default false
*/
forcePrompt?: boolean;
/**
* Optional login hint for the interactive sign-in flow.
*/
loginHint?: string;
}
export interface IntuneMAMAcquireToken {
accountId: string;
accessToken: string;
accountIdentifier: string;
idToken?: string;
username?: string;
tenantId?: string;
authority?: string;
}

静的トークン取得のオプション

export interface AcquireTokenSilentOptions {
/**
* Scopes to request, for example `https://graph.microsoft.com/.default`.
*/
scopes: string[];
/**
* Microsoft Entra object ID returned by `acquireToken` or `enrolledAccount`.
*/
accountId: string;
/**
* When true, bypass the cached access token and request a fresh one.
*
* @default false
*/
forceRefresh?: boolean;
}
export interface RegisterAndEnrollAccountOptions {
/**
* Microsoft Entra object ID returned by `acquireToken`.
*/
accountId: string;
}
export interface IntuneMAMUser {
accountId: string;
accountIdentifier?: string;
username?: string;
tenantId?: string;
authority?: string;
}

IntuneMAMAppConfig

コピー
export interface IntuneMAMAppConfig {
accountId: string;
fullData: Record<string, string>[];
values: Record<string, string>;
conflicts: string[];
}
export interface IntuneMAMPolicy {
accountId: string;
isPinRequired?: boolean;
isManagedBrowserRequired?: boolean;
isScreenCaptureAllowed?: boolean;
isContactSyncAllowed?: boolean;
isAppSharingAllowed?: boolean;
isFileEncryptionRequired?: boolean;
notificationPolicy?: string;
}

IntuneMAMGroupName

Intune MAM ポリシー
export interface IntuneMAMGroupName {
accountId: string;
groupName?: string;
}

IntuneMAMVersionInfo

Intune MAM グループ名
export interface IntuneMAMVersionInfo {
platform: 'ios' | 'android';
intuneSdkVersion: string;
msalVersion?: string;
}
export interface IntuneMAMChangeEvent {
accountId?: string;
}

真実の源

「真実の源」

このページはプラグインの src/definitions.ts公開 API がアップストリームで変更されたときは、再度同期を実行してください。

続けてGetting Started

「続けてGetting Started」

Capacitor を使用している場合 スタートガイド ダッシュボードと API の計画と実行を計画するには、Capacitor を使用してください。 @capgo/capacitor-Intuneを使用 Using @capgo/capacitor-intune API の概要 APIの実装詳細については 概要 __CAPGO_KEEP_0__の実装詳細については APIのキー APIのキーについて、 デバイス デバイスの実装詳細のために。