From 553b1ce695434331f663b235c18450569afcc005 Mon Sep 17 00:00:00 2001 From: Stefan Guilhen Date: Thu, 16 May 2024 09:25:31 -0300 Subject: [PATCH] Ensure org domain removal from the IDP is properly propagated to the DB Closes #29599 Signed-off-by: Stefan Guilhen --- .../java/org/keycloak/organization/jpa/OrganizationAdapter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/model/jpa/src/main/java/org/keycloak/organization/jpa/OrganizationAdapter.java b/model/jpa/src/main/java/org/keycloak/organization/jpa/OrganizationAdapter.java index 02356329ab..6f7915e311 100644 --- a/model/jpa/src/main/java/org/keycloak/organization/jpa/OrganizationAdapter.java +++ b/model/jpa/src/main/java/org/keycloak/organization/jpa/OrganizationAdapter.java @@ -155,6 +155,7 @@ public final class OrganizationAdapter implements OrganizationModel, JpaModel { if (Objects.equals(domainEntity.getName(), idp.getConfig().get(ORGANIZATION_DOMAIN_ATTRIBUTE))) { idp.getConfig().remove(ORGANIZATION_DOMAIN_ATTRIBUTE); + realm.updateIdentityProvider(idp); } }); }