Microsoft-authentication-library-for-dotnet: UWP AuthHost encountered a navigation error at URL: https://xxx.b2clogin.com/xxx.onmicrosoft.com/oauth2/authresp with StatusCode: 0x800C000D.

Created on 13 Nov 2020  Â·  18Comments  Â·  Source: AzureAD/microsoft-authentication-library-for-dotnet

Microsoft.Identity.Client 4.12.0 i have also tested with 4.22 latest version

Platform
UWP

What authentication flow has the issue?

  • Desktop / Mobile

    • [ ] Interactive

I have a UWP app In production from last one I year I have integrated with Azure B2C.
I am using MS account Google and Local account as IDP. Every thing is working from last one year.
from Last one week i am facing issue with MS login while Google and local account is working
In event view i am getting
AuthHost encountered a navigation error at URL: https://xxx.b2clogin.com/xxx.onmicrosoft.com/oauth2/authresp with StatusCode: 0x800C000D.

while when i capture the request in fiddler i am getting
Object moved

Object moved to href="msalxxxx%3a%2f%2fauth%2f%3fcode%3de> click here


I am confused with response from Event Log and fiddler. while in fiddler it seems to be getting the correct response which redirect to local msl url.

I have also tried the wab code directly same issues. var webAuthenticationResult =
await Windows.Security.Authentication.Web.WebAuthenticationBroker.AuthenticateAsync(
Windows.Security.Authentication.Web.WebAuthenticationOptions.None,
startURI,
endURI);

Off course i have tried couple of similar issues/fixes

https://github.com/Azure-Samples/active-directory-b2c-xamarin-native/issues/28
https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/1098

B2C external - IEF Mobile-UWP

All 18 comments

@vidya091209 can you run the user flows for this IDP from the B2C portal? Do you think this is library related? (this seems more service side related)?

hi @jmprieur I am working with @vidya091209 he is my programmer and i manage the app - though i don't know all the programming i am able to go into our portal and run the workflow - if you have a bit of time perhaps we can chat/share screen so you could advise? we don't think its our app since we never published any updates yet the microsoft login problem has started recently. thanks! Prem

Hi @jmprieur we have even one working web app integrated with same B2c app.
i think this might be related with Library. but i am not sure about the this response AuthHost encountered a navigation error at URL: https://xxx.b2clogin.com/xxx.onmicrosoft.com/oauth2/authresp with StatusCode: 0x800C000D. captured in event viewer while in fiddler i can see the response which is redirect to local url after authentication . msalxxxx%3a%2f%2fauth%2f%3fcode%3de.

NOTE: while Google and email account account they also redirect to same endpoint

Warning (False) MSAL 4.22.0.0 MSAL.UAP N/A [11/22/2020 11:47:04 - 5e0f2404-8c40-48a6-adb1-d8ea3ea0b3e7] Attempt 1 to call WAB failed
Warning (True) MSAL 4.22.0.0 MSAL.UAP N/A [11/22/2020 11:47:04 - 5e0f2404-8c40-48a6-adb1-d8ea3ea0b3e7] System.IO.FileNotFoundException: The specified protocol is unknown. (Exception from HRESULT: 0x800C000D)
at Microsoft.Identity.Client.Platforms.uap.WebUI.<>c__DisplayClass7_0.<b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.Identity.Client.Platforms.uap.DispatcherTaskExtensions.<>c__DisplayClass0_01.<<RunTaskAsync>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at Microsoft.Identity.Client.Platforms.uap.DispatcherTaskExtensions.RunTaskAsync[T](CoreDispatcher dispatcher, Func1 func, CoreDispatcherPriority priority)
at Microsoft.Identity.Client.Platforms.uap.WebUI.InvokeWABOnMainThreadAsync(Uri authorizationUri, Uri redirectUri, WebAuthenticationOptions options)
at Microsoft.Identity.Client.Utils.RetryOperationHelper.ExecuteWithRetryAsyncT

@vidya091209 is it something that happened with previous versions of MSAL.NET ?

i ma facing this issue with Microsoft.Identity.Client 4.12.0 and 4.22 both

@vidya091209 what is your b2c tenant? do you have a repro (like a zip file or Github link) you can share?

@jennyf19 sample app here https://github.com/vidya091209/uwpissue

@vidya091209 i was able to repro w/your sample. thank you. i need to sync w/someone on b2c side, but w/the thanksgiving holiday this week, that probably won't happen until next week.

Thank you so much!
Prem


From: jennyf19 notifications@github.com
Sent: Wednesday, November 25, 2020 9:57:31 AM
To: AzureAD/microsoft-authentication-library-for-dotnet microsoft-authentication-library-for-dotnet@noreply.github.com
Cc: Prem Sundaram prem@sundaram.net; Comment comment@noreply.github.com
Subject: Re: [AzureAD/microsoft-authentication-library-for-dotnet] UWP AuthHost encountered a navigation error at URL: https://xxx.b2clogin.com/xxx.onmicrosoft.com/oauth2/authresp with StatusCode: 0x800C000D. (#2188)

@vidya091209https://github.com/vidya091209 i was able to repro w/your sample. thank you. i need to sync w/someone on b2c side, but w/the thanksgiving holiday this week, that probably won't happen until next week.

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/2188#issuecomment-733861242, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO5OMCMENI2SC632QQHVT6DSRVAQXANCNFSM4TUPM2BQ.

@vidya091209 @premsundaram Just an update, we've created an incident w/B2C, so they will investigate. Going to mark this as external for now. Hopefully, we'll have an update by end of week.

thank you!

@vidya091209 @premsundaram if you can try this again and provide us with a correlation_Id, b2c can look it up in their logs. Based on the domain name & client_id, they are not seeing any issues.
Thank you.

Hi @jennyf19 we were finally able to solve this situation by upgrading our user flow to the new method in Azure. Even though Microsoft said that this would not be necessary until later this year. Thank you all for helping!
Prem

From: jennyf19notifications@github.com
Sent: Thursday, December 10, 2020 10:26 AM
To: AzureAD/microsoft-authentication-library-for-dotnetmicrosoft-authentication-library-for-dotnet@noreply.github.com
Cc: Prem Sundaramprem@sundaram.net; Mentionmention@noreply.github.com
Subject: Re: [AzureAD/microsoft-authentication-library-for-dotnet] UWP AuthHost encountered a navigation error at URL: https://xxx.b2clogin.com/xxx.onmicrosoft.com/oauth2/authresp with StatusCode: 0x800C000D. (#2188)

@vidya091209https://github.com/vidya091209 @premsundaramhttps://github.com/premsundaram if you can try this again and provide us with a correlation_Id, b2c can look it up in their logs. Based on the domain name & client_id, they are not seeing any issues.
Thank you.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/2188#issuecomment-742707526, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO5OMCIE75LDNJ33N47VKZLSUEHG3ANCNFSM4TUPM2BQ.

@premsundaram that's interesting. Thanks so much for the update.

@vidya091209 can you try upgrading the user flow as well?

@vidya091209 going to close, as @premsundaram seems to have a solution. Please reopen and tag me if you still have the issue after updating the user flow OR if you need assistance w/something related to this. thank you.

Hi @jennyf19 we were finally able to solve this situation by upgrading our user flow to the new method in Azure. Even though Microsoft said that this would not be necessary until later this year. Thank you all for helping! Prem From: jennyf19notifications@github.com Sent: Thursday, December 10, 2020 10:26 AM To: AzureAD/microsoft-authentication-library-for-dotnetmicrosoft-authentication-library-for-dotnet@noreply.github.com Cc: Prem Sundaramprem@sundaram.net; Mentionmention@noreply.github.com Subject: Re: [AzureAD/microsoft-authentication-library-for-dotnet] UWP AuthHost encountered a navigation error at URL: https://xxx.b2clogin.com/xxx.onmicrosoft.com/oauth2/authresp with StatusCode: 0x800C000D. (#2188) @vidya091209https://github.com/vidya091209 @premsundaramhttps://github.com/premsundaram if you can try this again and provide us with a correlation_Id, b2c can look it up in their logs. Based on the domain name & client_id, they are not seeing any issues. Thank you. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub<#2188 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO5OMCIE75LDNJ33N47VKZLSUEHG3ANCNFSM4TUPM2BQ.

Could you please elaborate on what you mean by upgrading the user flow?

Thanks!

@amirvenus
image
moving to the "recommended" version and not "standard"

Was this page helpful?
0 / 5 - 0 ratings