Skip to content

Certain errors are incorrectly surfaced as AuthenticationCancelException #473

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

Closed
twentynothing opened this issue Jan 15, 2016 · 7 comments
Closed
Assignees

Comments

@twentynothing
Copy link

I noticed that if client uses an incorrect parameter in acquireToken call, e.g. wrong resourceId, the webview still allows users to login but invokes onError callback with an AuthenticationCancelError, rather than an AuthenticationError with proper ADALError code

01-14 20:01:33.959 4155 4155 V BasicWebViewClient: 2016-01-15 01:01:33-0ba7a5c0-5f9d-495d-91dc-9d96bed646e6-Page finished:http://my-redirect-url/?error=invalid_resource&error_description=AADSTS50001%3a+The+application+named+https%3a%2f%2f.onmicrosoft.com%2f+was+not+found+in+the+tenant+named+.onmicrosoft.com.++This+can+happen+if+the+application+has+not+been+installed+by+the+administrator+of+the+tenant+or+consented+to+by+any+user+in+the+tenant.++You+might+have+sent+your+authentication+request+to+the+wrong+tenant.%0d%0aTrace+ID%3a+c69e1ae9-9c59-4470-aeac-b41603960ed8%0d%0aCorrelation+ID%3a+31017806-caf0-4a3d-9b15-0dcda2a1d8fd%0d%0aTimestamp%3a+2016-01-15+01%3a01%3a34Z&state=YT1odHRwczovL2xvZ2luLndpbmRvd3MubmV0L2hvbGxhbmRhaXNlcGFydG5lcnMub25taWNyb3NvZnQuY29tJnI9aHR0cHM6Ly9ob2xsYW5kYWlzZXBhcnRuZXJzLm9ubWljcm9zb2Z0LmNvbS9kdW1teU1UUA ver:1.1.11

01-14 20:01:34.071 4155 4155 D onError: exception:com.microsoft.aad.adal.AuthenticationCancelError: User cancelled the flow RequestId:245614969 CorrelationId: 31017806-caf0-4a3d-9b15-0dcda2a1d8fd

@weijjia
Copy link
Contributor

weijjia commented Feb 17, 2016

@heidijinxujia Can you take a look at this one? What happened is, when we fail to get a code, error is returned through redirect, we simply cancel the request and return the cancel error. This is definitely not correct.

@heidijinxujia
Copy link
Member

OK

@weijjia
Copy link
Contributor

weijjia commented Feb 17, 2016

@heidijinxujia Thanks. Please make sure we give the correct ADAL error code back, and we should also give back the error message server gave. Also, make sure we log those info.

@heidijinxujia
Copy link
Member

@twentynothing Hi, could you send me more details of the log? Thx!

@twentynothing
Copy link
Author

@heidijinxujia You should be able to reproduce this by passing incorrect resourceId or other params to acquireToken call.

@talk2arpit
Copy link

Hi,

We are also seeing this issue when server is too busy to handle clients request.

W BasicWebViewClient: 2016-06-21 18:19:59-97edcbed-2854-4b05-a208-c1b8cc533428-Cancel error:temporarily_unavailable ver:1.1.18 AADSTS90045: Service is too busy. Please try again later.

I BasicWebViewClient: 2016-06-21 18:19:59-97edcbed-2854-4b05-a208-c1b8cc533428-Sending intent to cancel authentication activity ver:1.1.18

Pls. fix this issue with priority. In our case customers are reporting that sometime when they perform some action which needs ADAL auth, nothing happens and even they don't get any other error also.

@weijjia
Copy link
Contributor

weijjia commented Oct 19, 2016

Duplicate as #726. Use #726 to track, close this one.

@weijjia weijjia closed this as completed Oct 19, 2016
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

4 participants