Share via

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

Developer technologies | .NET | Xamarin
Microsoft Security | Microsoft Entra | Microsoft Entra ID

Answer accepted by question author

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();

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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