active-directory-xamarin-native-v2
active-directory-xamarin-native-v2 copied to clipboard
Xamarin Forms iOS broker authentication doesn't work in combination with Microsoft Authenticator
Logs and network traces I added to files as attachment to this item on of the contains all log registered on iOS tablet, the second one contains only the errors
Which version of MSAL.NET are you using? MSAL.NET 4.47.0, 4.47.1, 4.47.2
Platform Xamarin Forms iOS project
What authentication flow has the issue? Mobile Interactive with Brocker
Repro The issue is appearing on iOS tablet OS version 15.7 when using MSAL for acquiring token with broker and on device is installed Microsoft Authenticator.
When trying to get the token MS authenticator is opened, after selecting account the authenticator will be close and the application will be restarted
var your = (code) => var pca = PublicClientApplicationBuilder.Create(authenticationService.ClientApplicationId) .WithIosKeychainSecurityGroup("com.microsoft.adalcache") .WithBroker() .WithRedirectUri("...") .Build();
Expected behavior After selecting the account in authenticator then application should use the account to generate a token and authenticate the user
Actual behavior Application is restarted and you should take the login process from beginning, in this way you're in a infinite loop and the login process will never end If MS authenticator is not installed, then the authentication with Brocker is working without no issue
Possible solution Additional context / logs / screenshots / links to code
I attached here a screen recording with issue reproduction, device logfiles
Reproduction Steps https://user-images.githubusercontent.com/20532118/199498062-27f375c5-29f7-4412-949a-8cb139aaa8cf.mp4
Device logs