Why does my Azure AD B2C go into infinite loop on login (localhost)

Lou's World Inc 66 Reputation points
2024-05-09T21:14:43.57+00:00

Followed tutorial (below) to set up a .Net 8 MVC app with an Azure AD B2C signin page. Using a new tenant with user flows. When I test the user flow with reply url, jwt.ms, a token is created. However, when I attempt to test login locally (https://localhost:1234/) the browser gets stuck in an infinite loop. I've tried logging in in private window (incognito)

https://learn.microsoft.com/en-us/aspnet/core/security/authentication/azure-ad-b2c?view=aspnetcore-8.0

@alfredorevilla-msft

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,760 questions
Azure Startups
Azure Startups
Azure: A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.Startups: Companies that are in their initial stages of business and typically developing a business model and seeking financing.
240 questions
{count} votes

Accepted answer
  1. James Hamil 23,136 Reputation points Microsoft Employee
    2024-05-10T20:49:00.1666667+00:00

    Hi @Lou's World Inc , one possible reason is that the redirect URI is not configured correctly. Please make sure that the redirect URI in your application registration matches the redirect URI in your code.

    Another possible reason is that the user flow is not configured correctly. Please make sure that the user flow is configured to return the correct claims and that the claims are mapped correctly in your code.

    If the issue persists, you can try enabling logging in your application to get more information about what is happening during the login process.

    If nothing here works please let me know and we can open a support ticket.

    Please let me know if you have any questions and I can help you further.

    If this answer helps you please mark "Accept Answer" so other users can reference it.

    Thank you,

    James

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful