microsoft-authentication-library-for-dotnet icon indicating copy to clipboard operation
microsoft-authentication-library-for-dotnet copied to clipboard

MSAL Android - App was stuck at callback screen

Open Nguyenthanhtoa opened this issue 1 year ago • 12 comments

I implemented MSAL authentication on Android using Xamarin with package Microsoft.Identity.Client and it has an issue at callback screen, the authentication was successully and the token was granted but the application was stuck in callback screen. When I zoom out or rotate my device to landscape it show a "continue" button, if I pressed that button, the authentication process will complete and can callback to my app.

This problem only occurred on some android device models, so I'm not sure why the UI/UX here is incorrect. Can you please give me an advise. Thank you! 1 2 3

Nguyenthanhtoa avatar Mar 07 '23 02:03 Nguyenthanhtoa

@Nguyenthanhtoa The right place for filing this issue would be Microsoft.Identity.Client.

@jmprieur @jennyf19 , Can you please help here?

negoe avatar Mar 12 '23 23:03 negoe

@SameerK-MSFT

jmprieur avatar Mar 13 '23 01:03 jmprieur

@trwalke - can you provide a perspective please?

bgavrilMS avatar Mar 14 '23 17:03 bgavrilMS

Looks to me like the AAD sign in page is causing this UI issue. Seems like it is failing to render the page correctly. Which version of android is used here? Also, which browser is being used for the devices that fails vs the devices that work?

trwalke avatar Mar 14 '23 22:03 trwalke

Hi @trwalke, I agree with you about that "Seems like it is failing to render the page correctly", I affraid that this issue may be related to MFA approve method or browser rendering method. I use Android 13 and MS Edge to login (I also tried with Chrome but still get the same error).

Nguyenthanhtoa avatar Mar 15 '23 07:03 Nguyenthanhtoa

Ok, if it is failing with multiple browsers and it works fine on some phones and not others, it seems like an external issue with the AAD login page. Probably something to do with the user agent but not sure @bgavrilMS.

trwalke avatar Mar 16 '23 21:03 trwalke

FYI @trwalke @bgavrilMS After receiving MFA approve notification request, if I ignore that notification and try to open Authenticator app and approve manually. The message and continue button will not appear and I can login app successfully.

MFA

Nguyenthanhtoa avatar Mar 17 '23 04:03 Nguyenthanhtoa

Hi @trwalke @bgavrilMS, do you have any update on it?

Nguyenthanhtoa avatar Mar 22 '23 02:03 Nguyenthanhtoa

@bgavrilMS do you know someone from ESTS we can contact for this?

trwalke avatar Mar 22 '23 04:03 trwalke

@Nguyenthanhtoa have you tried with MAUI? Does it work on MAUI?

Also what is the make and model of the Phone? What version of Xamarin/Forms do you use?

SameerK-MSFT avatar Mar 23 '23 23:03 SameerK-MSFT

Hi @SameerK-MSFT sam, No, I haven't. I'm not sure it work on MAUI because our project using Xamarin.Android (not Xamarin.Forms). The phone model is Samsung S10 with Android version 13. I use Microsoft.Identity.Client v4.43.2 and the application use MS Edge or Chrome as external browser to authente with Azure AD.

Nguyenthanhtoa avatar Mar 24 '23 02:03 Nguyenthanhtoa

I get this issue on both the Android simulator and a pixel 5 device, using MAUI 8.0.7 and Xamarin.AndroidX.Fragment.Ktx 1.6.2.2 (required to fix compilation issue).

On the same simulator using Xamarin Forms, it is working as expected.

softlion avatar Feb 28 '24 22:02 softlion