UWP authentication sometimes crashes
See original GitHub issueWhich Version of MSAL are you using ? MSAL 3.0.5-preview
Platform UWP
In my UWP app, I only had internetClient capability enabled and it works ok for most users. However, some of my users get an error like
{Microsoft.Identity.Client.MsalException: WAB authentication failed ---> System.IO.FileNotFoundException: The specified protocol is unknown. (Exception from HRESULT: 0x800C000D) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) ...(TRUNCATION)... --- End of stack trace from previous location where exception was thrown --- at UserDetailsClient.MainPage.d__2.MoveNext() ErrorCode: authentication_ui_failed}
Therefore I investigated about what could be the problem and found out it could be related to the app capabilites. Could you please clarify regarding the capabilites needed for UWP.
Here, @jennyf19 states these 4 capabilities are needed:
<Capabilities>
<Capability Name="internetClient" />
<Capability Name="privateNetworkClientServer" />
<uap:Capability Name="enterpriseAuthentication" />
<uap:Capability Name="userAccountInformation" />
</Capabilities>
However, in this example, these 4 capabilities are listed (sharedUserCertificates instead of userAccountInformation):
<Capabilities>
<Capability Name="internetClient" />
<Capability Name="privateNetworkClientServer" />
<uap:Capability Name="enterpriseAuthentication" />
<uap:Capability Name="sharedUserCertificates" />
</Capabilities>
Then again, in this example, only this capability is listed:
<Capabilities>
<Capability Name="internetClient" />
</Capabilities>
Two of the above capabilites, sharedUserCertificates & enterpriseAuthentication, are restricted capabilites and I would only want to include them if they are indeed needed.
All very confusing. Could you maybe clarify here and in the docs?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:25 (13 by maintainers)
Top GitHub Comments
Sure, I’ve just sent them
I added a retry when calling WAB and some information on how to collect logs if this occurs again. It’s not a fix per se, but hopefully it will bring us closer to a solution.