How to Logout all apps if user logout any one app which have SSO implemented

Ammar Idrees 20 Reputation points
2025-01-15T10:16:20.5966667+00:00

We have implemented SSO in our two web applications( Application 1 and Application 2) these are running on the different sub-domain of the parent domain.

After login into the applications via SSO, When we logout from Application 1 it landed into Home page. We expect the logout should be holistic and application 2 also should get auto logged out, But, it is not happening with Application 2, User login status is active in application 2, which requires the user to manually click on the logout button to logout from the application 2 Also logout operation is not success. The page ended with "You signed out of your account It's a good idea to close all browser windows."

Please, anyone, help me on resolving this?

Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
5,526 questions
Microsoft Entra ID
Microsoft Entra ID
A Microsoft Entra identity service that provides identity management and access control capabilities. Replaces Azure Active Directory.
23,149 questions
0 comments No comments
{count} votes

Accepted answer
  1. BANDELA Siri Chandana 1,405 Reputation points Microsoft Vendor
    2025-01-16T02:47:30.64+00:00

    Hi @Ammar Idrees

    Thank you for posting your query on Microsoft Q&A.

    I understand that you are trying to logout two applications, and the two applications are running on separate sub-domains. The session data is typically stored in the browser, and since each sub-domain is treated as a separate domain by the browser, the session data for one sub-domain is not available to the other.

    To resolve this issue, you'll need to implement Single Logout (SLO) in your Single Sign-On (SSO) system. SLO allows users to log out of all the applications they have logged into, instead of having to log out of each application individually.

    Here are the steps you can follow to implement SLO:

    1.Create a logout endpoint in your SSO server that will clear the user's session data when it is called.

    2.When the user logs out of Application 1, make an HTTP request to the logout endpoint to clear their session data.

    3.When Application receives the logout request, it should also clear its own session data. This will ensure that the user is logged out of both applications.

    4.You can also implement a redirect mechanism that will redirect the user to a common logout page after the session data has been cleared in all the applications.

    By following these steps, you can ensure that when a user logs out of one application, they are automatically logged out of all the other applications they have logged into.

    Hope this helps. Do let us know if you have any further queries.

    If this answers your query, do click `Accept Answer` and `Yes`.

    Thanks,

    B. Siri Chandana.


0 additional answers

Sort by: Most helpful

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.