AcquireToken silently fails for authenticator app
See original GitHub issuePlease ensure the following information is provided when logging a new issue:
- Expected behavior : MS Authenticator app should return access token
- Actual behavior : Authenticator app throws AUTH_REFRESH_FAILED_PROMPT_NOT_ALLOWED exception
- Step 1 : Install MS authenticator app (Broker app version: VersionName=6.2.13;VersonCode=103. ver:1.13.3 ).
Step 2: Create valid application on azure portal and use client id with android application. This application first calls acquire token api (acquireToken(Activity activity, String resource, String clientId, @Nullable String redirectUri, @Nullable String loginHint, @Nullable PromptBehavior prompt, @Nullable String extraQueryParameters, AuthenticationCallback<AuthenticationResult> callback)) from which I can successfully get access token for resource (example O365SharePoint).
Step 3 : Now since the user already logged so this application calls acquireTokenSilentAsync(String resource, String clientId, String userId, AuthenticationCallback<AuthenticationResult> callback) api to get token when it is running in background. This call fails with exception as AUTH_REFRESH_FAILED_PROMPT_NOT_ALLOWED.
Note : Credentials are not expired, account is valid.
LOGS
_02-22 11:33:33.795 9892-10610/? I/SampleApp Docs:SampleAppSDK: pool-8-thread-5 | SampleAppAdalSDK ADAL | acquiring token token sync 02-22 11:33:33.795 9892-10610/? V/PRNGFixes: 2018-02-22 11:33:33-cd98646c-bc59-497d-8289-76823fa77251-No need to apply the fix ver:1.13.3 02-22 11:33:33.796 9892-10610/? V/PRNGFixes: 2018-02-22 11:33:33-cd98646c-bc59-497d-8289-76823fa77251-No need to apply the fix ver:1.13.3 02-22 11:33:33.798 9892-10610/? V/BrokerProxy: 2018-02-22 11:33:33-cd98646c-bc59-497d-8289-76823fa77251-Device runs on 23 and above, skip the check for 22 and below. ver:1.13.3 02-22 11:33:33.800 9892-10610/? V/AcquireTokenRequest: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Sending async task from thread:10610 ver:1.13.3 02-22 11:33:33.800 9892-10586/? V/AcquireTokenRequest: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Running task in thread:10586 ver:1.13.3 02-22 11:33:33.803 9892-10586/? V/AcquireTokenRequest: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Try to acquire token silently, return valid AT or use RT in the cache. ver:1.13.3 02-22 11:33:33.803 9892-10586/? V/AcquireTokenRequest: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Try to silently get token from local cache. ver:1.13.3 02-22 11:33:33.804 9892-10586/? V/TokenCacheAccessor: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-No access token exists. ver:1.13.3 02-22 11:33:33.805 9892-10586/? V/AcquireTokenSilentHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-No valid access token exists, try with refresh token. ver:1.13.3 02-22 11:33:33.807 9892-10586/? V/AcquireTokenSilentHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Regular token cache entry does not exist, try with MRRT. ver:1.13.3 02-22 11:33:33.809 9892-10586/? V/AcquireTokenSilentHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-MRRT token does not exist, try with FRT ver:1.13.3 02-22 11:33:33.810 9892-10586/? V/AcquireTokenSilentHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-FRT cache item does not exist, fall back to try MRRT. ver:1.13.3 02-22 11:33:33.811 9892-10586/? V/AcquireTokenSilentHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Send request to use MRRT for new AT. ver:1.13.3 02-22 11:33:33.811 9892-10586/? V/AcquireTokenSilentHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-MRRT does not exist, cannot proceed with MRRT for new AT. ver:1.13.3 02-22 11:33:33.815 9892-10586/? D/AcquireTokenRequest: Cannot get AT from local cache, switch to Broker for auth, clear tokens from local cache for the user. 02-22 11:33:33.817 9892-10586/? V/AcquireTokenRequest: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-No token items need to be deleted for the user. ver:1.13.3 02-22 11:33:33.818 9892-10586/? I/AcquireTokenWithBrokerRequest: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Broker app is: com.azure.authenticator;Broker app version: VersionName=6.2.13;VersonCode=103. ver:1.13.3 02-22 11:33:33.819 9892-10586/? V/AcquireTokenWithBrokerRequest: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-User is specified for background(silent) token request, trying to acquire token silently. ver:1.13.3 02-22 11:33:33.820 9892-10586/? V/BrokerAccountServiceHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Binding to BrokerAccountService for caller uid: 10091 ver:1.13.3 02-22 11:33:33.826 9892-10586/? V/BrokerAccountServiceHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-The status for brokerAccountService bindService call is: true ver:1.13.3 02-22 11:33:33.840 9892-9892/? V/BrokerAccountServiceHandler: 2018-02-22 11:33:33-b4e2cf76-1f98-4a6e-8114-287e7e5145cc-Broker Account service is connected. ver:1.13.3 02-22 11:33:33.852 9892-10585/? I/SampleApp Docs:SampleAppSDK: AcquireTokenRequestHandlerThread | SampleAppAdalSDK ADAL | acquired token silently failed com.microsoft.aad.adal.AuthenticationException: Received error from broker, errorCode: AUTH_REFRESH_FAILED_PROMPT_NOT_ALLOWED; ErrorDescription: Account does not exist in the broker, cannot proceed with silent request 02-22 11:33:33.852 9892-10585/? I/SampleApp Docs:SampleAppSDK: AcquireTokenRequestHandlerThread | SampleAppAdalSDK ADAL | acquired token sync failed_
Please note: Do not include sensitive information like PII, OII, credentials, secrets, and tokens.
For privacy/security issues please see instructions here
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top GitHub Comments
@addev-ashish @iambmelt Is this issue not going to be looked at? There has been no update on this ticket since it was reopened 2 months ago.
Closing as no-op as library is crit-fixes only. Please file a new issue for our latest release if this issue continues to persist
1.x
versions are out of support