microsoftconnect / ms-intune-app-sdk-android

Intune App SDK for Android enables data protection features and mobile app management via Microsoft Intune
43 stars 17 forks source link

Config file support for: "account_mode" : "SINGLE" #205

Closed bgore closed 8 months ago

bgore commented 8 months ago

Summary

Documented configuration parameter: "account_mode", with value "SINGLE" is not working.

Repro steps

res/raw/auth_config.json: { "client_id": "", "authorization_user_agent": "DEFAULT", "redirect_uri": "msauth:///", "broker_redirect_uri_registered": true, "account_mode": "SINGLE", "logging": { "log_level": "VERBOSE" }, "authorities": [ { "type": "AAD", "audience": { "type": "AzureADMultipleOrgs", "tenant_id": "organizations" } } ] }

ApplicationActivity.kt: fun onCreate() { val msalClientApplication = PublicClientApplication.createSingleAccountPublicClientApplication(applicationContext, R.raw.auth_config) }

Result:

--------- beginning of crash
01-16 11:32:02.230 18156 18233 E AndroidRuntime: FATAL EXCEPTION: DefaultDispatcher-worker-2
01-16 11:32:02.230 18156 18233 E AndroidRuntime: Process: com.cisco.wx2.android.msintune.dev, PID: 18156
01-16 11:32:02.230 18156 18233 E AndroidRuntime: com.microsoft.identity.client.exception.MsalClientException: AccountMode in configuration is not set to single. Cannot initialize single account PublicClientApplication.
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at com.microsoft.identity.client.PublicClientApplication.createSingleAccountPublicClientApplication(PublicClientApplication.java:884)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at com.microsoft.identity.client.PublicClientApplication.createSingleAccountPublicClientApplication(PublicClientApplication.java:790)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at com.webex.teams.thirdpartylib.IntuneMAMAuthentication.<init>(IntuneMAMAuthentication.kt:65)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at com.webex.teams.thirdpartylib.MsintuneWebexUtils.initialize(MsintuneWebexUtils.kt:18)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at com.webex.teams.TeamsApplication.onCreateBackground(TeamsApplication.kt:440)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at com.webex.teams.TeamsApplication.access$onCreateBackground(TeamsApplication.kt:250)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at com.webex.teams.TeamsApplication$onCreate$3.invokeSuspend(TeamsApplication.kt:376)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
01-16 11:32:02.230 18156 18233 E AndroidRuntime:    Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@8fc7536, Dispatchers.Default]
rygo-msft commented 8 months ago

Hi @bgore, if I understand correctly, you are looking for support for your MSAL configuration. MSAL configuration is not part of the Intune SDK, so it is not something that we can provide support for.

Please file an issue in the MSAL repo with the details requested by their issue template.