0

Is there any reason if the Azure AD login is not redirecting back to the mobile app after successful MFA authentication with Azure AD?

Our app is built in Ionic Capacitor and the plugin that connects to the Azure AD authentication is the Auth Connect plugin

I checked the application's config and seems fine.

It only happens to some users

they stuck in this view after login validation is success

enter image description here

EDIT:

I just noticed that this issue occurs when there is another app that uses Microsoft Online as login authentication

the browser asks for which app is going to redirect its authentication

which I believe that some users experiencing the same although the pop up that asks which app the authentication will redirect is not displaying on their side

aj go
  • 637
  • 2
  • 10
  • 27

1 Answers1

0

The "unauthorized error" usually occurs if the users don't have access to the Application or if any policy is restricting the users to login.

To resolve the error, try the below:

  • Check whether the users have access to the Application:

Go to Enterprise Application -> Your App -> Users and Groups

enter image description here

  • Check whether the MFA is enabled or not. Enable it like below and test the secondary factor prompt during a sign-in event.

Go to Azure Portal -> Security -> Conditional Access -> Create New Policy

enter image description here

If still the issue persists, check whether the there is any organizational level policy that is restricting some users:

enter image description here

And also Check if SSO is enabled for users and check if cookies are causing the issue.

If you are using ASP.NET Core Identity, try disabling the protection by configuring cookies using the below code:

services.ConfigureExternalCookie(options => {
    // Other options
    options.Cookie.SameSite = SameSiteMode.None; }); services.ConfigureApplicationCookie(options => {
    // Other options
    options.Cookie.SameSite = SameSiteMode.None; });

Reference:

Azure active directory ioS redirection issue by Kartik Bhiwapurkar

Imran
  • 3,875
  • 2
  • 3
  • 12
  • Hi Imran, we aren't using .NET on our mobile app but the configuration we have is properly on it. also the user is also enabled MFA. – aj go Dec 09 '22 at 03:42
  • also, I just noticed that when I install app that uses microsoft login on web, as soon as it redirects back, it asks first for the app that it will open which I think is the same for the some of our users although the popup that suggest the app is not displaying on their side – aj go Dec 09 '22 at 03:47