Skip to content

Getting Started

GitHub
  1. 패키지를 설치하세요

    터미널 창
    bun add @capgo/capacitor-intune
  2. 자연 프로젝트 동기화

    터미널 창
    bunx cap sync
  3. Intune 네이티브 설정 완료 dedicated 페이지를 따라하시기 바랍니다. iOS 설정Android 설정 Intune는 호스트 앱 네이티브 구성이 필요합니다. brokered auth, redirect URI, manifests, entitlements, MSAL config.

요구 사항

요구 사항
  • Capacitor 8+
  • Android with Intune Android SDK 12.0.3
  • Intune iOS와 함께 iOS SDK 21.5.1
  • 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' });

API 요약

API 요약
  • acquireToken(options)Copy to clipboard
  • acquireTokenSilent(options)Microsoft 로그인 시작 및 토큰 및 계정 메타데이터 반환.
  • registerAndEnrollAccount(options)cached token을 읽기 위해 기존 계정에 대해.: ','MSAL 계정 등록 및 Intune에 등록.
  • loginAndEnrollAccount(): Intune이 로그인 및 등록 흐름을 제어하십시오.
  • appConfig(user): Intune 앱 구성 값을 계정에 읽어옵니다.
  • getPolicy(user): 계정에 대한 현재 Intune 앱 보호 정책을 읽어옵니다.
  • groupName(user): 공통 config helper 값이 있는 경우 읽어옵니다. GroupName : Intune과 MSAL 버전을 패키지에 포함된 것을 검사합니다.
  • sdkVersion()플랫폼 참고 사항

제목 ‘플랫폼 참고 사항’

웹은 지원되지 않습니다.
  • iOS와 Android 모두 네이티브 프로젝트 구성이 필요합니다. 그 이상의
  • Your Azure 등록, Intune 정책 assign, redirect URI, 그리고 권한은 앱에 따라 남아 있습니다. cap sync.
  • 계속 Getting Started에서 진행하십시오.

__CAPGO_KEEP_0__이 사용 중이라면 Getting Started __CAPGO_KEEP_0__와 Using @capgo/capacitor-intune for the native capability in Using @capgo/capacitor-intune, Capgo Enterprise for the product workflow in Capgo Enterprise, __CAPGO_KEEP_0__ Alternatives __CAPGO_KEEP_0__ Alternatives Capgo Alternatives Capgo Alternatives Capgo Consulting Capgo Consulting 제품 워크플로우를 위한