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

Network error when MS endpoints are available #1547

Open
lo-g opened this issue Jul 15, 2020 · 0 comments
Open

Network error when MS endpoints are available #1547

lo-g opened this issue Jul 15, 2020 · 0 comments
Assignees
Labels
Enhancement This is a feature request to add functionality that is not currently supported Issue Triage The engineering team has looked into the issue, understood the issue, labelled/classified the issue

Comments

@lo-g
Copy link

lo-g commented Jul 15, 2020

Hi Adal community!

I'm facing a strange behaviour with an Android app I'm developing.
Basically my app connects to an access point through WiFi (without internet) and I've a scenario in which device has not a mobile network available.
In this scenario my access point has whitelisted all Microsoft endpoints in order to give the possibility to user to login (via AcquireTokenInteractive Request).
Using Android < 10 everything is OK (connection to WiFi is made programmatically) because network is saved to system level, troubles start when using Android 10.
I'm notice that HttpUtil.throwIfNetworkNotAvailable uses DefaultConnectionService.isConnectionAvailable() that uses getActiveNetworkInfo() to check connectivity status but it's deprecated and this check for Android 10 always fails.

I'm stuck because I'm able to perform login via interactive login but this connectivity check is blocking my flow.
I've tested removing this check and then binded process to network and it's working.

There are a better way to fix this or I've to implement this skip manually?

e.g:

    private void acquireTokenInteractiveFlow(...,                       
                                             final boolean skipConnectivityCheck)

if (!skipConnectivityCheck)
	HttpUtil.throwIfNetworkNotAvailable(...)
  • Expected behavior: Using a WiFi network without internet but all MS endpoints in whitelist I'm able to login via interactive webview.
  • Actual behavior: AuthenticationException due ADALError.DEVICE_CONNECTION_IS_NOT_AVAILABLE is throw
  • Steps to reproduce the problem:
  • Using Android 10 connect to a WiFi network without internet (programmatically), with an ADAL authority whitelisted.
  • Call acquireToken
  • Specifications like the version of the library, operating system etc.: Android 10 / Adal 1.16.3
  • Relevant logs and traces: ---
AdamBJohnsonx added a commit to AzureAD/microsoft-authentication-library-common-for-android that referenced this issue Aug 14, 2020
AdamBJohnsonx added a commit to AzureAD/microsoft-authentication-library-common-for-android that referenced this issue Nov 18, 2020
@iambmelt iambmelt added Enhancement This is a feature request to add functionality that is not currently supported Issue Triage The engineering team has looked into the issue, understood the issue, labelled/classified the issue labels Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This is a feature request to add functionality that is not currently supported Issue Triage The engineering team has looked into the issue, understood the issue, labelled/classified the issue
Projects
None yet
Development

No branches or pull requests

3 participants