Post logout redirect url - should redirect to login page instead of index page

Sarah 161 Reputation points
2021-12-01T14:19:38.263+00:00

When I give this URL - "https://login.microsoftonline.com/tenant-id/oauth2/v2.0/logout", It logs me out fine.

When I give the below URL, it logs me out and says "you signed out of your account" but have trouble redirecting it to the login page, instead redirects to the index page (the landing page of app)
handleLogout = () => {
window.location = 'https://login.microsoftonline.com/tenant-id/oauth2/v2.0/logout?client_id=client_id&post_logout_redirect_uri=https%3A%2F%2Flocalhost%3A44321%2F'
}

May I know why it gets redirected to index page instead of Azure AD login page after log out? Post_logout_redirect_url is same as redirect(reply) URL configured for the application. So, index URL and login URL are same but we should be presented with login page as we have signed out. Thank you.

Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
21,902 questions
{count} votes

Accepted answer
  1. Siva-kumar-selvaraj 15,646 Reputation points
    2021-12-02T05:04:10.137+00:00

    Hello @Sarah ,

    Thanks for reaching out.

    I would like to share similar post here for your reference. Kindly let me know if that answer your question. Thanks.

    ------
    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.

    2 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. MarkGrotskiy315 1 Reputation point
    2021-12-02T05:33:31.3+00:00

    Hello @Sarah ,
    Thanks for reaching out.
    I would like to share similar post here for your reference. Kindly let me know if that answer your question. Thanks.

    Thank you for the link, managed to find possible solution there


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.