question

TakaseNaoki-6372 avatar image
0 Votes"
TakaseNaoki-6372 asked sikumars commented

Sign-in screen is not displayed correctly

I'm doing OAuth authentication for my Microsoft 365 account in a WPF application.
When I make an authorization request using Microsoft.Identity.Client, the "Sign in to account" screen does not respond correctly.
Please let us know if there is such a case or how to deal with it.

194850-signin.png



・Occurs in a virtual environment. Not always, but with a high probability of making an authorization request after restarting the virtual environment.
 The virtual environment is Hyper-V.
 OS Windows 10 Pro(21H1)64bit
 CPU Intel(R) Xeon(R) CPU E5-2690 v3 @ 2.60GHz 2.60 GHz、Disk space 80GB、Memory 8GB
・It occurs the first time after restarting, and if you press the x button to display the "Sign in to account" screen again, it will be displayed correctly.
・The version of Microsoft.Identity.Client is 2.7.1. The authorization request is made below.
 [AsyncStateMachine(typeof(<AcquireTokenAsync>d__9))]
 public Task<AuthenticationResult> AcquireTokenAsync(IEnumerable<string> scopes, IAccount account, UIBehavior behavior, string extraQueryParameters);

azure-ad-authentication
signin.png (8.9 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @TakaseNaoki-6372,
I'd want to check in and see if you had any other questions or if you were able to resolve this issue? If you have any other questions, please let us know. Thank you for your time and patience throughout this issue.

0 Votes 0 ·

1 Answer

sikumars avatar image
0 Votes"
sikumars answered sikumars edited

Hello @TakaseNaoki-6372,

Thanks for reaching out and apologies for the delayed response.

As I could see that you are using a very old MSAL version (2.7.1) and there have been many improvements with the latest version, so it's worth to upgrading to the latest version first, as this issue may have already been resolved.

Reference: https://www.nuget.org/packages/Microsoft.Identity.Client/
The roadmap at https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/wiki#roadmap.

In addition to that you can also use Web Account Manager (WAM) to acquire a token along with MSAL. More details: https://docs.microsoft.com/en-us/azure/active-directory/develop/scenario-desktop-acquire-token-wam

If you wish to examine more on this issue rather than upgrading to the current version, I'd recommend contacting Azure support via their customer service number for your country/region or through an Azure support request because this would involve real troubleshooting to determine the reason of the issue.

Hope this helps.


Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.