Search code examples
asp.net-core-mvcazure-web-app-serviceazure-ad-b2c

Azure AD B2C return url in azure web app plan


I have a ASP.NET Core MVC app connected to Azure AD B2C (here is a example I use). When I run the up on my local laptop it runs fine Return URL: https://localhost:44316/signin-oidc But when I publish the app to azure web app plan it not works. With the return URL https:// https://myapp.azurewebsites.net/signin-oidc I become an HTML 404 error when I try to login. With the url: https://myapp.azurewebsites.net/ it goes back to my application without any login.


Solution

  • I was getting the same error when my reply URL in application was http://localhost:port/signin-oidc . I have corrected the app.setting with the callback path to and published :-

    "CallbackPath": "/signin-oidc",
    

    And i removed the localhost URL from the reply URL and kept it like below:

    enter image description here

    Re started the web app and it worked for me.Try and let know how it worked for you.