android emulator

Juan Rivero 20 Reputation points
2023-05-06T19:39:46.64+00:00

I am running a maui blazor app on an android emulator. The app is built to first launch the app and then has the option to login into azureb2c. When I click the login on the app it looks like is launching the https://xxxxb2c.b2clogin.com/tfp/xxxxxb2c.onmicrosoft.com/b2c_1_xxxxxb2c/oauth2/v2.0/authorize?...... and then when the login page is supposed to show I only get a blank page. I am using Azure B2C to authenticate with azure.

If I copy the whole above url on my machine it takes me to the login page from azure.

So, this is an emulator issue. I am using a (Google API's Pixel 5 - API 30) - Android 11.0 - API 30, processor x86, Memory 1G and resolution 1080 x 2340 - 440 dpi image.

The windows machine in Blazor works with the authentication and the sign in page. I can run the app.

Microsoft Entra External ID
Microsoft Entra External ID
A modern identity solution for securing access to customer, citizen and partner-facing apps and services. It is the converged platform of Azure AD External Identities B2B and B2C. Replaces Azure Active Directory External Identities.
2,722 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
20,182 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Akshay-MSFT 17,086 Reputation points Microsoft Employee
    2023-05-09T06:14:50.2566667+00:00

    @Juan Rivero

    Thank you for posting your query on Microsoft Q&A, from above description I could understand that your application sign in is not working for Azure B2C on Android emulator.

    Please do correct me if this not the issue.

    To start with Kindly validate the AndroidManifest.xml and add BrowserTabActivity activity to the application body:

    <!--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>
    

    Please do let me know by responding in the comments section if the issue persist.

    Thanks,

    Akshay Kaushik

    Please "Accept the answer" (Yes), and share your feedback if the suggestion answers you’re your query. This will help us and others in the community as well.