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

When the client id entered is invalid, the error messages can be better #727

Closed
shivbijlani opened this issue Dec 13, 2018 · 0 comments
Closed
Labels
Milestone

Comments

@shivbijlani
Copy link

I tried creating a windows desktop app. I entered in the wrong client id in the code (due to copy paste challenges :-).

I got some interesting errors, hoping these can be improved:

  1. When signing into the app with an MSA user, the popup shows a "We're unable to complete the request" generic error message.
  2. On cancelling the popup, i get this error in the result window. This is not expected since the library should know that I'm on windesktop and not on android?
Error Acquiring Token: Microsoft.Identity.Client.MsalClientException: User canceled authentication. On an Android device, this could be due to the lack of capabilities, such as custom tabs, for the system browser. See https://aka.ms/msal-net-system-browsers for more information.    at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.VerifyAuthorizationResult()    at Microsoft.Identity.Client.Internal.Requests.InteractiveRequest.<ExecuteAsync>d__9.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.Identity.Client.Internal.Requests.RequestBase.<RunAsync>d__16.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.Identity.Client.PublicClientApplication.<AcquireTokenForLoginHintCommonAsync>d__22.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at Microsoft.Identity.Client.PublicClientApplication.<AcquireTokenAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown ---    at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)    at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)    at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()    at active_directory_wpf_msgraph_v2.MainWindow.<CallGraphButton_Click>d__3.MoveNext() in C:\Users\shivb\Downloads\active-directory-dotnet-desktop-msgraph-v2-master\active-directory-dotnet-desktop-msgraph-v2-master\active-directory-wpf-msgraph-v2\MainWindow.xaml.cs:line 60     ErrorCode: authentication_canceled
Edited
<https://teams.microsoft.com/l/message/19:[email protected]/1544648708171?tenantId=72f988bf-86f1-41af-91ab-2d7cd011db47&amp;groupId=e8095862-5f1f-4095-b996-6b78e479e4b4&amp;parentMessageId=1544647346196&amp;teamName=Azure AD Client SDK Team&amp;channelName=Dotnet SDK discussions&amp;createdTime=1544648708171>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants