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

Require Tag and internal error code for WAM errors when thrown as an Msal exception #4106

Closed
crmann1 opened this issue Apr 26, 2023 · 2 comments · Fixed by #4112
Closed

Require Tag and internal error code for WAM errors when thrown as an Msal exception #4106

crmann1 opened this issue Apr 26, 2023 · 2 comments · Fixed by #4112

Comments

@crmann1
Copy link
Contributor

crmann1 commented Apr 26, 2023

Right now in
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/blob/4e8df7a04cdec8a21a5a8dc57439f23561ec23e1/src/client/Microsoft.Identity.Client/Platforms/uap/WamBroker/WamAdapters.cs

When an unknown broker error is encountered the error code is just "unknownbroker error". Can you attach the internal error code and the tag to the msal exception, this information is critical to diagnose wam related errors. The information is in the message, but we need it on the object in order to use it in remote telemetry.

For example the string says

"Unknown Status: Unexpected Error: 0xffffffff80070520 Context: Unexpected exception while waiting for accounts control to finish: '(pii)' Tag: 0x1f7d734b (error code -2147023584) (internal error code 528315211)"

We need the error code, internal error code and tag.

@bgavrilMS
Copy link
Member

@crmann1 - the code that you point to is older WAM implementation, which we now only use for UWP. This is the code that transforms the WAM error into an MSAL exception

Looks like the flow goes into the default case of the switch. We can improve the actual message I think.

Is the ask to have a new exception type, where Tag and Internal Error Code are available programmatically (the Error Code can be made available even now).

@bgavrilMS bgavrilMS added the VS label Apr 26, 2023
@bgavrilMS bgavrilMS added this to the 4.54.0 milestone Apr 26, 2023
@crmann1
Copy link
Contributor Author

crmann1 commented Apr 26, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
3 participants