Xamarin b2c azure native app login blank login screen RRS feed

  • Question

  • I'm using a Xamarin app and trying to get b2c login page working. The Application for the app in Azure is setup Web App / Web API as No and Native Client as Yes. The redirect URI is myappname://aLoginContentPageInApp

    The login page in uri is launched by mainactivity in app.

    I'm getting a blank white web page page when calling this instead of the page with the identity provides we setup with policies.

    If I make the clientid invalid I am getting the error page for our azure account and it tells me the site is secure.

    When I fix the error however I tells me the site is not secure and an empty white pages shows. Any help appreciated.

                             ar = await BaseApp.ClientApplication.AcquireTokenAsync(BaseApp.Scopes, 

                                 GetUserByPolicy(BaseApp.ClientApplication.Users, BaseApp.PolicySignUpSignIn), UiParent);


            public static string[] Scopes = { "User.Read", "Mail.Send", "Files.ReadWrite" }; 

            // Azure AD B2C Coordinates
            public static string Tenant = "ourtenant.onmicrosoft.com";
            public static string ClientID = "OUR CLIENT ID OF NATIVE APP SETUP IN AZURE";
            public static string PolicySignUpSignIn = "OUR DEV POLICY"; 
            public static string AuthorityBase = $"https://login.microsoftonline.com/tfp/{Tenant}/";
            public static string Authority = $"{AuthorityBase}{PolicySignUpSignIn}";
            public static string AuthorityPasswordReset = $"{AuthorityBase}{PolicyResetPassword}";

            public const bool DefaultValidateAuthority = false;
            public static bool ValidateAuthority = DefaultValidateAuthority;

            public BaseApp(IntPtr handle, JniHandleOwnership transfer) : base(handle, transfer)
                ClientApplication = new PublicClientApplication(ClientID,  Authority);
                ClientApplication.RedirectUri = $"msal{ClientID}://auth";                        
                //ClientApplication.ValidateAuthority = false;  

    • Moved by Mattew Wu Monday, May 7, 2018 2:51 AM not publishing issue
    Saturday, May 5, 2018 2:04 AM

All replies

  • Hello,

    Since this issue is out of the scope of publishing forum, I will move your thread.

    For Xamarin issue, you'd better ask at Stack overflow forum or Xamarin official site.

    Thanks for your understanding.

    Best regards,

    Mattew Wu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, May 7, 2018 2:51 AM