0
votes

I created a ASP.NET Core 3.1 web app in VS2019 and it uses Azure B2C authentication. And it works if I register a user as Local account.

Also, I set up Microsoft and Google identity providers. Now, I click on "Sign In" link in my app (https://localhost:44396/AzureADB2C/Account/SignIn) and it presents standard Azure B2C auth screen. I click on "Microsoft" (account) and it does some redirect and then shows me:

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.

Which part is missing in this should-be-simple set up?

1

1 Answers

0
votes

Follow step 7 again, your redirect uri is incorrect. https://docs.microsoft.com/en-us/azure/active-directory-b2c/identity-provider-microsoft-account

Go to the App registration you created as part of the setup to federate with Microsoft Accounts.

Go to Authentication, make sure you have Web Platform enabled and a RedirectURI set to https://<tenant-name>.b2clogin.com/<tenant-name>.onmicrosoft.com/oauth2/authresp in the text box. Replace <tenant-name> with your Azure AD B2C tenant name.