Using Azure Active Directory with aspnetcore app

One way is to use custom URL Rewriting Middleware to redirect by checking the Homepage path.

For Example, In app.UseMvc use below code:

app.UseRewriter(
    new RewriteOptions().Add(
        context => { if (context.HttpContext.Request.Path == "/AzureAD/Account/SignedOut")
            { context.HttpContext.Response.Redirect("/Home/Index"); }
        })
);

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top