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

Action Blocked error (MsalClientException: The activity is killed unexpectedly.) #2221

Open
Innova133 opened this issue Nov 15, 2024 · 0 comments

Comments

@Innova133
Copy link

Describe the bug
User is getting an Action Blocked - This action is not allowed by your organization. Message when trying to log into Line of Business App using MSAL. This user was previously able to log into the application, but got a new phone, and has not been able to log in on the new phone. Other users can log in fine. If there is a configuration issue, there should be better logging to point the exact issue.

Smartphone (please complete the following information):

  • Device: Samsung SM-S926U1
  • Android Version: Android 14
  • Browser: N/A
  • MSAL Version: 5.1.0 - 5.7.0

Stacktrace
com.microsoft.identity.client.exception.MsalClientException: The activity is killed unexpectedly.
at com.microsoft.identity.client.internal.controllers.MsalExceptionAdapter.msalExceptionFromBaseException(Unknown Source:23)
at com.microsoft.identity.client.SingleAccountPublicClientApplication$3.onError(SourceFile:2)
at com.microsoft.identity.client.SingleAccountPublicClientApplication$3.onError(SourceFile:1)
at com.microsoft.identity.common.java.controllers.CommandDispatcher.commandCallbackOnError(Unknown Source:14)
at com.microsoft.identity.common.java.controllers.CommandDispatcher.access$900(Unknown Source:0)
at com.microsoft.identity.common.java.controllers.CommandDispatcher$4.run(Unknown Source:46)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:9063)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Caused by: com.microsoft.identity.common.java.exception.ClientException: The activity is killed unexpectedly.
at com.microsoft.identity.common.internal.result.MsalBrokerResultAdapter.getBaseExceptionFromExceptionType(Unknown Source:108)
at com.microsoft.identity.common.internal.result.MsalBrokerResultAdapter.getBaseExceptionFromBundle(Unknown Source:38)
at com.microsoft.identity.common.internal.result.MsalBrokerResultAdapter.getAcquireTokenResultFromResultBundle(Unknown Source:26)
at com.microsoft.identity.common.internal.controllers.BrokerMsalController.acquireToken(Unknown Source:146)
at com.microsoft.identity.common.java.commands.InteractiveTokenCommand.execute(SourceFile:10)
at com.microsoft.identity.common.java.commands.InteractiveTokenCommand.execute(SourceFile:1)
at com.microsoft.identity.common.java.controllers.CommandDispatcher.executeCommand(Unknown Source:1)
at com.microsoft.identity.common.java.controllers.CommandDispatcher.access$100(Unknown Source:0)
at com.microsoft.identity.common.java.controllers.CommandDispatcher$5.run(Unknown Source:111)
at io.opentelemetry.context.Context.lambda$wrap$1(Unknown Source:4)
at io.opentelemetry.context.Context.c(Unknown Source:0)
at D5.v.run(Unknown Source:715)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)
at java.lang.Thread.run(Thread.java:1012)

To Reproduce
Steps to reproduce the behavior:

This exception happens when the Line of Business application attempts to sign in the user, ie:

val params = SignInParameters.builder() .withActivity(activity) .withScope( BuildConfig.APP_PROXY_SCOPE ) .withPrompt(prompt) .withCallback(callback) .build() singleAccountApp.signIn(params)

Expected behavior
The user should be able to sign in to their account, and control should be returned to the Line of Business application in the onSuccess method of the AuthenticationCallback

Actual Behavior
The user immediately sees an error message, and the onError method of the AuthenticationCallback is called.

Screenshots
Media

Additional context
As mentioned above, this application works for all other users, and worked for this user on a previous device. We don't see anything wrong with the APP, or user setup. Because the login activity shows the Action Blocked dialog right away, there are no login logs to see, and the exception back to the client application is not helpful.

Please note: Do not include sensitive information like PII, OII, credentials, secrets, and tokens.

For privacy/security issues please see instructions here

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