Getting Started
复制一个包含安装步骤和本插件的完整 Markdown 指南的配置提示。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-intune`, `@capgo/capacitor-persona`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/persona/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
安装
标题:安装bun add @capgo/capacitor-intunebunx cap sync导入
标题:导入import { IntuneMAM } from '@capgo/capacitor-intune';API 概述
标题:API 概述acquireToken
标题:acquireToken呈现 Microsoft 登录流程并返回访问令牌和帐户元数据。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireToken({} as AcquireTokenOptions);acquireTokenSilent
标题:获取静默令牌获取 MSAL 缓存中之前登录的用户的令牌。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.acquireTokenSilent({} as AcquireTokenSilentOptions);registerAndEnrollAccount
标题:注册并注册帐户使用 Intune 注册之前身份验证的帐户并开始注册。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.registerAndEnrollAccount({} as RegisterAndEnrollAccountOptions);loginAndEnrollAccount
标题:登录并注册帐户要求 Intune 对用户进行身份验证和注册,而不先请求应用令牌。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.loginAndEnrollAccount();enrolledAccount
标题:已注册帐户如果有可用的 Intune 帐户,则返回当前已注册的帐户。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.enrolledAccount();deRegisterAndUnenrollAccount
标题:注销和解除注册账户注销 Intune 账户并在适用时触发选择性擦除。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.deRegisterAndUnenrollAccount({} as IntuneMAMUser);logoutOfAccount
标题:注销账户使用 MSAL 注销用户而不解除 Intune 账户的注册。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.logoutOfAccount({} as IntuneMAMUser);appConfig
标题:应用配置获取 Intune 管理账户的远程应用配置。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.appConfig({} as IntuneMAMUser);getPolicy
标题:获取策略获取 Intune 管理账户的当前有效应用保护策略。
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.getPolicy({} as IntuneMAMUser);groupName
名为“groupName”的部分当存在时,解析应用配置值的便利工具。 GroupName 复制到剪贴板
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.groupName({} as IntuneMAMUser);Return the native Intune and MSAL SDK versions bundled by this plugin.
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.sdkVersion();displayDiagnosticConsole
显示原生 Intune 诊断 UI。复制到剪贴板
import { IntuneMAM } from '@capgo/capacitor-intune';
await IntuneMAM.displayDiagnosticConsole();pluginName
类型参考AcquireTokenOptions
获取令牌选项交互式令牌获取选项。
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;}IntuneMAMAcquireToken
Intune MAM 令牌获取export interface IntuneMAMAcquireToken { accountId: string; accessToken: string; accountIdentifier: string; idToken?: string; username?: string; tenantId?: string; authority?: string;}AcquireTokenSilentOptions
静默令牌获取选项静默令牌获取选项。
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;}RegisterAndEnrollAccountOptions
注册和注册账户选项export interface RegisterAndEnrollAccountOptions { /** * Microsoft Entra object ID returned by `acquireToken`. */ accountId: string;}IntuneMAMUser
Intune MAM 用户export interface IntuneMAMUser { accountId: string; accountIdentifier?: string; username?: string; tenantId?: string; authority?: string;}IntuneMAMAppConfig
名为“IntuneMAMAppConfig”的部分export interface IntuneMAMAppConfig { accountId: string; fullData: Record<string, string>[]; values: Record<string, string>; conflicts: string[];}IntuneMAMPolicy
名为“IntuneMAMPolicy”的部分export interface IntuneMAMPolicy { accountId: string; isPinRequired?: boolean; isManagedBrowserRequired?: boolean; isScreenCaptureAllowed?: boolean; isContactSyncAllowed?: boolean; isAppSharingAllowed?: boolean; isFileEncryptionRequired?: boolean; notificationPolicy?: string;}IntuneMAMGroupName
名为“IntuneMAMGroupName”的部分export interface IntuneMAMGroupName { accountId: string; groupName?: string;}IntuneMAMVersionInfo
名为“IntuneMAMVersionInfo”的部分export interface IntuneMAMVersionInfo { platform: 'ios' | 'android'; intuneSdkVersion: string; msalVersion?: string;}IntuneMAMChangeEvent
名为“IntuneMAMChangeEvent”的部分export interface IntuneMAMChangeEvent { accountId?: string;}真实数据源
数据源本页面由插件生成 src/definitions.ts. 当上游的公共 API 变更时,请重新同步
从开始入门继续
从开始入门继续如果您正在使用 开始入门 来规划仪表板和 API 操作,请将其与 使用 @capgo/capacitor-intune 用于在使用 @capgo/capacitor-intune 中的本机功能 API 概述 用于在 API 概述 中的实现细节 简介 简介中的实现细节 API Keys API Keys中的实现细节 设备 简介中的实现细节