Using MSAL With Split Context #2396
Unanswered
Jeff Trotz (jmtrotz)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hello,
I am developing a plugin for an Android application that uses the Microsoft Authentication Library to login with the user's Microsoft account. The tricky part about plugin development is I have to juggle two forms of
android.content.Context: the context of the main application and the context of the plugin. The split context seems to be preventing me from creating an instance ofPublicClientApplication. The configuration files (both my custom config and the default config included in the library) live within the context of the plugin, butPublicClientApplicationrequires the application context. If I use the application context, the MSAL throws an exception when it tries to load the default configuration (I use the plugin context to load my config into a File and pass this in instead of the resource ID). If I use the plugin context, the MSAL throws an exception when it tries to validate the context. How can I use the MSAL in this scenario? Looking atPublicClientApplicationConfigurationFactory, there did not seem to be any way around loadingmsal_default_config.json?Thanks,
Jeff
All reactions