Search code examples
asp.net-coreazure-active-directorymicrosoft-identity-platform

Customize Azure AD signout page


I'm using Azure AD for the login in my ASP.NET Core app. The sign out link is <a class="nav-link text-dark" asp-area="MicrosoftIdentity" asp-controller="Account" asp-action="SignOut">, and after the sign out is successful it redirects me to MicrosoftIdentity/Account/SignedOut. How can I have it redirect to another page?


Solution

  • In this case, you could build your own AccountController instead of the default one in the official sample, or use a URL Rewriting Middleware to redirect the URL you want.

    Reference - How to specify custom logout URL when using Azure AD authentication in .NET core