Skip to content

はじめから

GitHub

CapgoのAIアシストセットアップを使用してプラグインをインストールできます。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';

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

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

acquireTokenSilent

acquireTokenSilent

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

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

Intuneに登録済みのアカウントを登録し、エンロールを開始します。

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

Intuneに認証を求めずにアプリトークンを要求する前に、ユーザーをエンロールするように求める

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

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

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

Intune からアカウントを削除し、適用可能な場合に選択的な削除をトリガーします。

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

MSAL からユーザーをサインアウトするが、Intune アカウントをアンロールしない。

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

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

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

管理されたアカウントのための現在の有効な Intune アプリ保護ポリシーを取得します。

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

アプリの設定値を解決する便利なヘルパーです。 GroupName 値が存在する場合のアプリの設定値を解決します。

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

このプラグインによってバンドルされたネイティブのIntuneとMSALSDKバージョンを返します。

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

displayDiagnosticConsole

診断コンソールの表示

ネイティブのIntune診断UIを表示します。

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

Intune MAM アプリ構成
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;
}
export interface IntuneMAMVersionInfo {
platform: 'ios' | 'android';
intuneSdkVersion: string;
msalVersion?: string;
}

IntuneMAMChangeEvent

Intune MAM イベント変更
export interface IntuneMAMChangeEvent {
accountId?: string;
}

真実の源

真実の源

このページはプラグインから生成されます。 src/definitions.ts. upstreamのpublic APIが変更されたときは、再度syncを実行してください。

Getting Startedから続けてください。

Getting Startedから続けてください。

あなたが「Getting Started」を使用して、ダッシュボードと__CAPGO_KEEP_0__の操作を計画している場合、 Getting Started to plan dashboard and API operations, connect it with Using @capgo/capacitor-intune Using @capgo/capacitor-intune API Overview API Overview Introduction 導入の実装詳細について API キー API キーについての実装詳細、 デバイス デバイスについての実装詳細。