diff --git a/services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java b/services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java index 4434a544bc..7297f31760 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/TokenManager.java @@ -124,6 +124,10 @@ public class TokenManager { } public static void attachClientSession(UserSessionModel session, ClientSessionModel clientSession) { + if (clientSession.getUserSession() != null) { + return; + } + UserModel user = session.getUser(); clientSession.setUserSession(session); Set requestedRoles = new HashSet();