关于Android ADAL中BROKER_AUTHENTICATOR_NOT_RESPONDING错误的处理咨询
Hey Brian, let's walk through the error logs you shared and cover what steps you can take to resolve this and help your users complete login smoothly.
First, Let's Break Down the Error
From your logs, the root issue is straightforward:
Tue May 22 23:19:13 GMT+02:00 2018: D/InstrumentationHandler: Event: AuthEvent_LogonAccessError with Properties: {EntityType=Event, ErrorReason=Authenticator is not responding}
Tue May 22 23:19:13 GMT+02:00 2018: D/InstrumentationHandler: Event: Eng_CustomEvent with Properties: {... Microsoft.ADAL.api_error_code=BROKER_AUTHENTICATOR_NOT_RESPONDING ...}
This means the ADAL library is trying to use the Microsoft Authenticator app as a secure authentication broker, but it's failing to get a response from the app.
Steps to Help Users Complete Login
Here are actionable fixes to guide your users through:
Verify Authenticator App Health
- Confirm the user has the official Microsoft Authenticator app installed (not a third-party alternative) and it’s updated to the latest version via Google Play.
- Check if Android’s battery optimization is blocking the app: Many OEMs (Samsung, Xiaomi, etc.) restrict background activity. Have users add Authenticator to their device’s "unrestricted apps" or "battery optimization exceptions" list.
- Suggest restarting the Authenticator app first, then the entire device if the issue persists.
Adjust ADAL Configuration (If Permitted)
- If your use case doesn’t require mandatory broker authentication, you can disable it to bypass the Authenticator dependency. Add this line when initializing ADAL in your code:
PublicClientApplication pca = new PublicClientApplication.Builder(context) .setClientId(clientId) .setUseBroker(false) // Fall back to WebView-based login .build(); - Double-check your authority URL is correctly formatted (e.g.,
https://login.microsoftonline.com/your-tenant-id). The logs showauthority_type=aad, so confirm the tenant ID or domain is valid.
- If your use case doesn’t require mandatory broker authentication, you can disable it to bypass the Authenticator dependency. Add this line when initializing ADAL in your code:
Temporary Workarounds
- Have users clear your app’s cache (Settings > Apps > [Your App] > Storage > Clear Cache) and restart the app before attempting login again.
- Suggest switching network connections (e.g., from Wi-Fi to mobile data) — sometimes network glitches block communication between your app and Authenticator.
Special Handling Recommendations
- Upgrade to MSAL: Your ADAL version (1.55.0) is outdated, and Microsoft has deprecated ADAL in favor of MSAL (Microsoft Authentication Library). MSAL offers improved broker support, bug fixes, and ongoing maintenance, which will help prevent similar issues long-term.
- Monitor for Widespread Issues: If this error pops up across multiple devices, it might indicate a regional Authenticator service glitch. In that case, you could temporarily disable broker auth in your app until the service is restored.
内容的提问来源于stack exchange,提问作者Brian Schnack

