Skip to content

안드로이드 설정

GitHub

1. Intune Gradle 플러그인을 추가하세요

1. Intune Gradle 플러그인을 추가하세요

앱 프로젝트의 최상위 android/build.gradle, Intune Gradle 플러그인 JAR를 클래스패스에 추가하세요. 플러그인 패키지는 다음과 같습니다: buildscript 현재 Intune Android __CAPGO_KEEP_0__ 릴리스를 위한 Ionic이 설명하는 Duo Maven 피드를도 포함하세요.

  • 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'
}

In android/app/build.gradle:

apply plugin: 'com.microsoft.intune.mam'

자원 최적화가 비활성화된 채로 남겨두세요:

android.enableResourceOptimizations=false

3. 인증 설정 파일을 제공하세요. auth_config.json

제목: "3. 인증 설정 파일을 제공하세요."

만들기 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"
}
}
]
}

플러그인은 MSAL과 Intune 인증 콜백을 위해 런타임에 이 파일을 기대합니다.

4. 애플리케이션 태그를 구성하세요. <application> 태그

제목: "4. 애플리케이션 태그를 구성하세요."

애플리케이션에서 커스텀을 정의하지 않은 경우 Application:

<application
android:name="app.capgo.intune.IntuneApplication"
android:enableOnBackInvokedCallback="false">

애플리케이션에서 이미 커스텀을 정의한 경우 Application: MAMApplication 확장 IntuneMamServiceAuthenticationCallbackonMAMCreate().

등록

에서

5. 브로커 인증 쿼리 및 리다이렉트 처리를 추가하세요

  • com.azure.authenticator
  • com.microsoft.windowsintune.companyportal
  • 제목 "5. 브로커 인증 쿼리 및 리다이렉트 처리를 추가하세요"

패키지 가시성 쿼리 Ionic 문서에 대해 추가하세요: "브라우저 감지 의도"도 추가하세요 BrowserTabActivity Capgo와 함께 msauth:// MSAL이 로그인 라운드 트립을 완료할 수 있도록 Redirect URI 호스트/경로를 변경하세요.

6. Capgo 플러그인을 사용하세요.

6. Capgo 플러그인을 사용하세요.

Capacitor API은 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 설정에서 계속 진행하세요.

Section titled “Android 설정에서 계속 진행하세요.”

Capgo 플러그인을 사용하는 경우 Android 설정 네이티브 플러그인 작업을 계획하는 경우 Android 설정을 사용하여 __CAPGO_KEEP_0__-intune과 연결하세요. Using @capgo/capacitor-intune Capgo native 기능을 사용하는 경우 @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, 플러그인 추가 또는 업데이트 플러그인 추가 또는 업데이트 구현 세부 정보, 및 이오닉 엔터프라이즈 플러그인 대안 Capgo 제품 워크플로우에 대해 이오닉 엔터프라이즈 플러그인 대안.