Trying to implement Azure Active Directory B2C gives me a 404 error Trying to implement Azure Active Directory B2C gives me a 404 error azure azure

Trying to implement Azure Active Directory B2C gives me a 404 error


I was having the same issue as well. Some of the things you can check are:

  • Make sure the name of the policies in your webconfig and in Azure ADare the exact same, including the correct upper/lower case

  • Make sure the AadInstance has a trailing slash (/)

  • Make sure you have the latest version of the owin and microsoft.identitymodel.protocol.extensions libraries ( suggestre-loading them from NuGet )

    • This last one is the issue that I had the hardest time finding. Ifthe resulting URL in your browser contains 2 question marks, thenthis is the fix.


If you're trying to use .auth/me make sure your Store Token is enabled in Authentication Settings. Else it'll give you a 404. :)


Looks like your parameter ida:AadInstance is wrong. Should be:

https://{0}.b2clogin.com/{1}/v2.0/.well-known/openid-configuration?p={2}{0}: tenantid{1}: tenantid.onmicrosoft.com{2}: policy name

If you like to keep login.microsoftonline.com, the url has to be:

https://login.microsoftonline.com/tfp/{0}/{1}/v2.0/{0}: tenantid.onmicrosoft.com{1}: policy name

RegardsKonrad