Android 설정
이 플러그인에 대한 설치 단계와 전체 마크다운 가이드를 포함한 설정 지시를 복사하세요.
1. Intune Gradle 플러그인을 추가하세요.
1. Intune Gradle 플러그인을 추가하세요.애플리케이션 프로젝트의 상위 레벨에서 android/build.gradleIntune Gradle 플러그인 JAR를 클래스패스에 추가하세요. 플러그인 패키지에는 다음과 같은 항목이 포함되어 있습니다. buildscript Duo Maven 피드를 Ionic이 현재 Intune Android __CAPGO_KEEP_0__ 릴리스에 대해 설명합니다.
android/ms-intune-app-sdk-android/GradlePlugin/com.microsoft.intune.mam.build.jar
Also include the Duo Maven feed that Ionic documents for current Intune Android SDK releases:
maven { url 'https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed/maven/v1' name 'Duo-SDK-Feed'}2. 앱 모듈을 업데이트하세요.
Section titled “2. 앱 모듈 업데이트”In android/app/build.gradle:
apply plugin: 'com.microsoft.intune.mam'And keep resource optimization disabled:
android.enableResourceOptimizations=false3. 제공 auth_config.json
Section titled “3. auth_config.json 제공”생성 android/app/src/main/res/raw/auth_config.json:
{ "client_id": "YOUR_CLIENT_ID", "authorization_user_agent": "BROWSER", "redirect_uri": "msauth://YOUR_PACKAGE/YOUR_SIGNATURE_HASH", "broker_redirect_uri_registered": true, "account_mode": "MULTIPLE", "authorities": [ { "type": "AAD", "audience": { "type": "AzureADMyOrg" } } ]}4. 구성
태그 <application> Copy to clipboard
4. 애플리케이션 태그를 구성하는 방법앱이 이미 커스텀을 정의하지 않았다면 Application__CAPGO_KEEP_0__
<application android:name="app.capgo.intune.IntuneApplication" android:enableOnBackInvokedCallback="false">이미 커스텀을 정의한 경우 Application확장 MAMApplication 및 등록 IntuneMamServiceAuthenticationCallback 에서 onMAMCreate().
5. 브로커 인증 쿼리 및 리다이렉트 처리 추가
5. 브로커 인증 쿼리 및 리다이렉트 처리 추가하는 방법패키지 가시성 쿼리 Ionic 문서에서:
com.azure.authenticatorcom.microsoft.windowsintune.companyportal- 브라우저 감지 의도
또한 MSAL이 로그인 라운드 트립을 완료할 수 있도록 __CAPGO_KEEP_0__ __CAPGO_KEEP_1__의 호스트/경로와 함께 추가하세요. BrowserTabActivity __CAPGO_KEEP_0__ __CAPGO_KEEP_1__의 호스트/경로와 함께 추가하세요. msauth:// 6. 플러그인 사용
Once the app-level native setup is complete, the Capacitor API is the same as on iOS:
import { IntuneMAM } from '@capgo/capacitor-intune';
const auth = await IntuneMAM.acquireToken({ scopes: ['https://graph.microsoft.com/.default'],});
await IntuneMAM.registerAndEnrollAccount({ accountId: auth.accountId,});Android 설정을 연결하세요. __CAPGO_KEEP_0__ __CAPGO_KEEP_1__의 호스트/경로와 함께 추가하세요. __CAPGO_KEEP_0__ __CAPGO_KEEP_1__의 호스트/경로와 함께 추가하세요. Using @capgo/capacitor-intune for the native capability in Using @capgo/capacitor-intune Capgo Plugin Directory for the product workflow in Capgo Plugin Directory Capacitor Plugins by Capgo for the implementation detail in Capacitor Plugins by Capgo Adding or Updating Plugins for the implementation detail in Adding or Updating Plugins, and Ionic Enterprise Plugin Alternatives for the product workflow in Ionic Enterprise Plugin Alternatives