Azure AD after successfully logging in with Mobile, it gets stuck on a white blank screen

862 Views Asked by At

I am using Xamarin.Android: 12.0.0.3 for mobile app and backend side .net core 2.1 and Azure Active Directory I have registered a new app for the mobile app I have to add :

  • Client id
  • Tenant id
  • and Redirect URI same client configurations I set up in .net core 2.1 and Xamarin.Android: 12.0.0.3

When I am trying to log in with mobile on Stack Overflow, I only get a blank screen. No error or anything.

The exact process:

  1. Click login with azure ad
  2. Redirect to Microsoft login
  3. After entering id and password login success but Blank screen

I have tried clearing the cache and disabling all extensions, but that had no effect.

Below mentioned is the MSAL configuration for Android platform :

com.XXX.XXXandroid:host="com.XXX.XXX"
{
  "client_id": "80d5e150-xxxx-xxxx-xxxx-91e02321fdfa",
  "authorization_user_agent": "DEFAULT",
  "redirect_uri": "msauth://com.XXX.XXX/xxxxxxxrSw0yVb%2FvlWAYkK%2Fxxxx%3D",
  "authorities": [
    {
      "type": "AAD",
      "audience": {
        "type": "AzureADMyOrg",
        "tenant_id": "eab845cd-xxxx-xxxx-xxxx-edb4c387d231"
      }
    }
  ]
}

Has anyone else encountered this issue?

1

There are 1 best solutions below

0
Roshan On
I have resolved the above issue by this reference link

Click [here]( https://learn.microsoft.com/en-us/azure/active-directory-b2c/enable-authentication-android-app?tabs=kotlin"this text appears when you mouse over")!

In Mobile side we have Add this below Code

    <!--Intent filter to capture System Browser or Authenticator calling back to our app after sign-in-->
<activity
    android:name="com.microsoft.identity.client.BrowserTabActivity">
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="msauth"
            android:host="Package_Name"
            android:path="/Signature_Hash" />
    </intent-filter>
</activity>