From 3e007aa0c4d69774e410dd5535cceeb307e8b84a Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Thu, 7 Jul 2022 16:37:17 +0200 Subject: [PATCH] (fix) pass realm in sync context --- .../java/sh/libre/scim/storage/ScimStorageProviderFactory.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/sh/libre/scim/storage/ScimStorageProviderFactory.java b/src/main/java/sh/libre/scim/storage/ScimStorageProviderFactory.java index a3cf57427a..d961b70032 100644 --- a/src/main/java/sh/libre/scim/storage/ScimStorageProviderFactory.java +++ b/src/main/java/sh/libre/scim/storage/ScimStorageProviderFactory.java @@ -124,6 +124,8 @@ public class ScimStorageProviderFactory @Override public void run(KeycloakSession session) { + var realm = session.realms().getRealm(realmId); + session.getContext().setRealm(realm); var dispatcher = new ScimDispatcher(session); if (model.get("propagation-user").equals("true")) { dispatcher.runOne(model, (client) -> client.sync(UserAdapter.class, result));