AcquireTokenInteractive crashes on UWP app for ARM64
See original GitHub issueVersion of Nuget Microsoft.Identity.Client 4.19.0
Platform: UWP on ARM64
In a UWP Desktop App, running on ARM64, we want to authenticate for OneDrive, using the method IPublicClientApplication.AcquireTokenInteractive(…).ExecuteAsync();
Repro
private readonly string[] m_scopes = new[] { "Files.ReadWrite" };
IPublicClientApplication s_publicClientApp = PublicClientApplicationBuilder.Create("MyAppKeyForOneDrive")
.WithRedirectUri("https://login.microsoftonline.com/common/oauth2/nativeclient")
.Build();
IEnumerable<IAccount> accounts = await s_publicClientApp.GetAccountsAsync();
IAccount firstAccount = accounts?.FirstOrDefault();
AuthenticationResult authResult;
if (firstAccount != null)
{
authResult = await s_publicClientApp.AcquireTokenSilent(m_scopes, firstAccount).ExecuteAsync();
}
else
{
authResult = await s_publicClientApp.AcquireTokenInteractive(m_scopes).ExecuteAsync();
}
Expected behavior User is shown the login popup to enter credentials, and after successful login, the code receives a valid authResult.
Actual behavior On ARM64, the app crashes with an unrecoverable exception in SharedLibrary.dll.
Additional context/ Logs / Screenshots Please note that the very same code works perfectly in x64.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:65 (32 by maintainers)
Top Results From Across the Web
Crash in UWP app on ARM64 device while executing ...
On ARM64, the app crashes with an exception in SharedLibrary.dll while executing the API AcquireTokenInteractive for MS Feed sign-in.
Read more >Troubleshooting MSAL.NET
AcquireTokenInteractive crashes in a UWP app for ARM64. Symptom. On ARM64 (for example a Surface Pro X), the app crashes with an unrecoverable ......
Read more >UWP App crashes when main process tries to get a folder ...
Main Process tries to open that folder to check for new Files. When this happens, while the background process is still accessing the...
Read more >Crashes when trying to debug uwp application
I've seen the crash happen in diferent places, I've been unable to exactly reproduce the same exception. fixed in: visual studio 2019 version ......
Read more >admin - davidpritchard.org
Crash Capture: Record Stack Trace. From a UWP app, we don't have access to many Win32 APIs – but we can call CaptureStackBackTrace....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am also disappointed to hear this issue has been closed without fixing it. This is especially frustrating for new developers picking up this library - they will all run into the same problem eventually. I have read through the whole thread now and haven’t seen an explanation on why a) this cannot be fixed in the library and b) what
UseDotNetNativeSharedAssemblyFrameworkPackage
actually does and why it is a functioning workaroundIf it’s not a bug in the MSAL library, where is the crash originating from then?
@bgavrilMS could your team acquire these arm64 dev kits for testing? https://www.microsoft.com/en-us/d/ecs-liva-mini-box-qc710-desktop/8z247h1h3skp