Skip to content

Certain errors are incorrectly surfaced as AuthenticationCancelException #473

Closed
@twentynothing

Description

@twentynothing

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions