SAML Logout Issue with Microsoft Entra ID and Keycloak 18v – Session Not Terminating on Entra

SP 5 Reputation points
2025-05-30T06:06:16.0666667+00:00

Description:

We have configured SAML-based SSO with Microsoft Entra ID as the external IdP for our application using Keycloak 18v. The setup details are attached in the screenshot. However, we’re facing a critical issue with the logout process:

  • When a user logs out of our application, the session is terminated in both the application and Keycloak, but the session remains active in Entra ID.
  • This causes a security issue: if another user attempts to log in on the same system (using the same browser), they are not prompted to reauthenticate with Entra ID and are automatically logged in without entering credentials.

Steps to Reproduce:

  1. USER-1 logs into our application via Chrome. Since it’s their first login, they are redirected to Entra ID for SSO authentication, enter their credentials, and log in successfully.
  2. USER-1 logs out of the application.
  3. USER-2 attempts to log in using the same browser. Instead of being prompted for authentication, USER-2 is automatically logged into the application as soon as they enter their username.

Expected Behavior:

  • After logout, the Entra ID session should also terminate, ensuring that any subsequent login attempt prompts for reauthentication.

Keycloak SAML.png EntraSetup1.png EntraSetup2.png

Microsoft Security | Microsoft Entra | Microsoft Entra ID
{count} vote

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.