Authentication failed with Azure Active Directory in Windows Phone

2

I am follow the window phone authentication tutorial with Add authentication to your Mobile Services app. And I choose using Azure Active Directory way to make authentication. But the question is: it always fails and shows The remote procedure call failed. (Exception from HRESULT: 0x800706BE) at the following code

    protected override async void OnNavigatedTo(NavigationEventArgs e)
    {

        await Authenticate();//here throws System.Exception in mscorlib.ni.dll
        await RefreshMissionTable();
    }

And I make sure there is nothing wrong in my Azure setting. The weird thing is that when I choose windows phone universal app sample, and do the same procedure again, it can work in the windows 8.1 emulator! But still can't work in the windows phone 8.1 emulator . And the break point stays here

#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
        UnhandledException += (sender, e) =>
        {
            if (global::System.Diagnostics.Debugger.IsAttached) global::System.Diagnostics.Debugger.Break();
        };
#endif
    }
}

}

windows
azure
windows-phone-8
azure-active-directory
asked on Stack Overflow Feb 15, 2015 by Spikerman

1 Answer

2

this might be related to a known problem with the WebAuthenticationBroker on Windows Phone 8.1: it cannot be invoked until the full UX of the app has been loaded. Please take a look to this thread for a description of the issue and proposed workarounds: https://social.msdn.microsoft.com/Forums/vstudio/en-US/95c6569e-2fa2-43c8-af71-939e006a9b27/mobile-services-loginasync-remote-procedure-call-failed-hresult-0x800706be?forum=azuremobile HTH V.

answered on Stack Overflow Feb 16, 2015 by vibronet

User contributions licensed under CC BY-SA 3.0