MSAL Android Xamarin Stuck Dialog - "Are you trying to sign in to {your_appname}"?

joel schaubert 101 Reputation points
2021-09-29T17:42:53.127+00:00

We are using MSAL through Azure Portal in single tenant mode.

This dialog comes up and pressing the buttons gives nothing.
Pressing "continue" does nothing and no output comes to the debugger
Pressing "cancel" does nothing and no output comes to the debugger

The app is authenticating, we can see it in the Azure Portal logs every time we click "continue"
If we click "continue" 3 times, we see 3 confirmed authentications in the Azure Portal logs.

Why does this dialog not respond to the button clicks?
136336-msalstuckdialog.jpg

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,377 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,174 questions
{count} votes

Accepted answer
  1. joel schaubert 101 Reputation points
    2021-10-05T15:46:30.333+00:00

    Problem was fixed by adding this
    .WithUseEmbeddedWebView(true)

    Now the dialog no longer comes up

                result = await authContext.AcquireTokenInteractive(Scopes)
                    .WithAuthority(Authority)
                    .WithUseEmbeddedWebView(true)
                    .WithParentActivityOrWindow(pwindow)
                    .ExecuteAsync();
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.