Azure b2c RedirectUrls and localhost

Mark 1 Reputation point
2021-04-28T16:10:01.94+00:00

For my Azure AD app registrations, I've recently followed the guidance here: https://learn.microsoft.com/en-us/azure/active-directory/develop/reply-url#localhost-exceptions to update my https://localhost redirect urls to remove the :port number from the Url.

So when doing local debugging we can run our web app locally on any port and still login via Azure AD without having to explicitly set up the port numbers in the App registration.

However, the same doesn't seem to work in Azure B2C redirect urls. When I take the port number out of my https://localhost urls I can't login as the redirect that comes back no longer has the port number.

Is just not supported in Azure b2c, or do I need to do anything extra in my set up?

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,639 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Marilee Turscak-MSFT 33,801 Reputation points Microsoft Employee
    2021-04-28T19:53:06.117+00:00

    It needs to match the path of your running application (whether it's local or published), so you would need to add the port number. This is documented here: https://learn.microsoft.com/en-us/azure/active-directory-b2c/tutorial-register-applications?tabs=app-reg-ga

    0 comments No comments