You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 of PublicClientApplication. The configuration files (both my custom config and the default config included in the library) live within the context of the plugin, but PublicClientApplication requires 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 at PublicClientApplicationConfigurationFactory, there did not seem to be any way around loading msal_default_config.json?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
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
Beta Was this translation helpful? Give feedback.
All reactions