ERR_CONNECTION_REFUSED Azure AD B2C

Shant Hagopian 21 Reputation points
2022-11-01T22:09:57.67+00:00

Hi,

I have setup B2C authentication on Azure with a front facing web app service and a backend.

Initially I had to add https://localhost:5001/signin-oidc in Azure B2C Authentication > App Registrations > Web app > Authentication > Redirect URIs under Web

Later on I also added https://mywebapp.azurewebsites.net/signin-oidc as well so that I can use Azure B2C authentication on the published webapp

It's working well, but sometimes users started getting ERR_CONNECTION_REFUSED when they try to open the sign in page, and the URL changes to https://localhost:5001/signin-oidc
So naturally, I removed https://localhost:5001/signin-oidc from the list of Redirect URIs, but users keep getting the same error

I thought maybe this is a cache issue, but even on new machines, that have never accessed the web app sign in page before, they sometimes get the ERR_CONNECTION_REFUSED error.

The only way we can work around this at the moment is opening the sign in page in Incognito mode.

Here's a screenshot
256160-azure-connection-refused-issue.jpg

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,769 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 2022-11-09T19:15:29.667+00:00

    Hello @Shant Hagopian and thanks for reaching out. If Azure AD B2C is redirecting, you to https://localhost:5001/signin-oidc it means the URL is still registered in the app registration. Otherwise, you would get a AADB2C90006 error.

    Collect a network trace in the browser to see if the URL is being sent as a param by the application or by B2C. If it's by the application, review the code and configuration to update it. If it its by B2C please open a support request and request it to be assigned to Alfredo Revilla, that's me :)

    Let us know if you need additional assistance. If the answer was helpful, please accept it and complete the quality survey so that others can find a solution.