Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Null Pointer Exception : Azure login with personal microsoft accounts added as a guest user in azure portal gives null pointer exception #116

Open
SudipAtlas opened this issue Aug 22, 2024 · 1 comment

Comments

@SudipAtlas
Copy link

FATAL EXCEPTION: main
Process: com..*, PID: 16160
java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:207)
at com.wrobins.cordova.plugin.MsalPlugin.getAccountObject(MsalPlugin.java:581)
at com.wrobins.cordova.plugin.MsalPlugin.getAuthResult(MsalPlugin.java:568)
at com.wrobins.cordova.plugin.MsalPlugin.access$1500(MsalPlugin.java:47)
at com.wrobins.cordova.plugin.MsalPlugin$6$1.onSuccess(MsalPlugin.java:416)
at com.microsoft.identity.client.PublicClientApplication.postAuthResult(PublicClientApplication.java:2351)
at com.microsoft.identity.client.SingleAccountPublicClientApplication$3.onTaskCompleted(SingleAccountPublicClientApplication.java:443)
at com.microsoft.identity.client.SingleAccountPublicClientApplication$3.onTaskCompleted(SingleAccountPublicClientApplication.java:434)
at com.microsoft.identity.common.java.controllers.CommandDispatcher.commandCallbackOnTaskCompleted(CommandDispatcher.java:650)
at com.microsoft.identity.common.java.controllers.CommandDispatcher.access$1000(CommandDispatcher.java:99)
at com.microsoft.identity.common.java.controllers.CommandDispatcher$4.run(CommandDispatcher.java:626)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:240)
at android.os.Looper.loop(Looper.java:351)
at android.app.ActivityThread.main(ActivityThread.java:8377)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1013)

@SudipAtlas
Copy link
Author

SudipAtlas commented Aug 23, 2024

found the claims in account object is null
acct.put("claims", processClaims(Objects.requireNonNull(account.getClaims()))); but the claims object can be null
/**
* Gets the claims associated to this Account's IdToken. In the case of the Microsoft Identity
* Platform, this value can be null if the home tenant has not been authorized.
*
* @return The claims for this Account's IdToken or null, if no IdToken exists.
*/
@nullable
@OverRide
public Map<String, ?> getClaims() {
return mIdTokenClaims;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant