AD B2C - Invalid Redirect Uri

rv_dev 11 Reputation points

Hi There,

I'm having an issue authenticating using Azure Active Directory B2C using the Microsoft Identity Platform.

I'm trying to follow the tutorial here:

In App Registrations I have added an application. For the "Who can use this application or access this API" I chose:

Accounts in any organizational directory or any identity provider. For authenticating users with Azure AD B2C.

I chose "Web" as the platform and for my redirect URI I set it to:

I created a secret.

It has the Microsoft Graph API permission and I also added my own under "Expose an API". I have added the API scope I created in API Permissions and granted admin consent.


In Identity providers I select "Microsoft Account" and entered the client Id and client secret of the above app I registered.


I proceeded to create a user flow and chose the v2 of the sign up/sign in. I selected "Microsoft Account" as the identity provider and also selected "Identity Provider Access Token" as one of the application claims to return.

I then clicked on "Run user flow" - the application I created was already selected, the reply URL was set as along with the correct resource and scope.

I clicked on the "Run user flow" button which opens a new browser tab with the following error:

invalid_request: The provided value for the input parameter 'redirect_uri' is not valid. The expected value is a URI which matches a redirect URI registered for this client application.

Thing is, my redirect URI in my registered app and the redirect uri is the same as what was in "run user flow"..

I'm sure I have either completely missed or misunderstood something but I can't figure out what and why I am getting that error? :-(

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

1 answer

Sort by: Most helpful
  1. AmanpreetSingh-MSFT 56,506 Reputation points

    Hi @rv_dev ,

    In this scenario, there are 2 applications with two different Redirect URIs involved.

    1. Microsoft account application: This is used when you authenticate using Microsoft account and after successful authentication it posts the response to B2C at
    2. Federated application: This is the application that is federated with Azure AD B2C and it's reply url (aka redirect uri) is where the token issued by B2C is posted.

    Based on the information that you have shared, I am suspecting a problem with Microsoft Account application. Please verify if the redirect_uri is configured as per the above url.


    Please do not forget to "Accept the answer" wherever the information provided helps you to help others in the community.