Sunday, 1 January 2023

acquireTokenSilentAsync: The signed in account does not match with the provided account

I am using MSAL for Android and confused about this error:

The signed in account does not match with the provided account.
(Error code current_account_mismatch, from acquireTokenSilentAsync)

This is what I am doing:

  1. Uninstall my own app, install it again

  2. Login via signIn() method of MSAL

  3. Call acquireTokenSilentAsync():

         val parameters = AcquireTokenSilentParameters.Builder()
             .withScopes(scopes.toList())
             .withCallback(authenticationCallback)
             .build()
    
         _msalPublicClient.acquireTokenSilentAsync(parameters)
    

    This call leads to a call of the onError method of the authenticationCallback with

com.microsoft.identity.client.exception.MsalClientException: The signed in account does not match with the provided account.

How can that be fixed? How can the provided account (whatever that is?) be different from the signed in account on a new app installation?



from acquireTokenSilentAsync: The signed in account does not match with the provided account

No comments:

Post a Comment