diff --git a/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java b/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java index 8eb68f0d8488..59cb9420f2db 100755 --- a/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java +++ b/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java @@ -1176,7 +1176,7 @@ private AuthenticationSessionModel parseSessionCode(String code, String clientId private Response checkAccountManagementFailedLinking(AuthenticationSessionModel authSession, String error, Object... parameters) { UserSessionModel userSession = new AuthenticationSessionManager(session).getUserSession(authSession); - if (userSession != null && authSession.getClient() != null && authSession.getClient().getClientId().equals(Constants.ACCOUNT_MANAGEMENT_CLIENT_ID)) { + if (userSession != null && authSession.getClient() != null) { this.event.event(EventType.FEDERATED_IDENTITY_LINK); UserModel user = userSession.getUser();