diff --git a/services/src/main/java/org/keycloak/organization/admin/resource/OrganizationIdentityProvidersResource.java b/services/src/main/java/org/keycloak/organization/admin/resource/OrganizationIdentityProvidersResource.java index 0395d4d7bf..4634f30c02 100644 --- a/services/src/main/java/org/keycloak/organization/admin/resource/OrganizationIdentityProvidersResource.java +++ b/services/src/main/java/org/keycloak/organization/admin/resource/OrganizationIdentityProvidersResource.java @@ -70,6 +70,8 @@ public class OrganizationIdentityProvidersResource { description = "Adds, or associates, an existing identity provider with the organization. If no identity provider is found, " + "or if it is already associated with the organization, an error response is returned") public Response addIdentityProvider(String id) { + id = id.replaceAll("^\"|\"$", ""); // fixes https://github.com/keycloak/keycloak/issues/34401 + try { IdentityProviderModel identityProvider = session.identityProviders().getByIdOrAlias(id); diff --git a/services/src/main/java/org/keycloak/organization/admin/resource/OrganizationMemberResource.java b/services/src/main/java/org/keycloak/organization/admin/resource/OrganizationMemberResource.java index 478a78cc0c..525dd325c6 100644 --- a/services/src/main/java/org/keycloak/organization/admin/resource/OrganizationMemberResource.java +++ b/services/src/main/java/org/keycloak/organization/admin/resource/OrganizationMemberResource.java @@ -81,6 +81,8 @@ public class OrganizationMemberResource { "an existing user with the organization. If no user is found, or if it is already associated with the organization, " + "an error response is returned") public Response addMember(String id) { + id = id.replaceAll("^\"|\"$", ""); // fixes https://github.com/keycloak/keycloak/issues/34401 + UserModel user = session.users().getUserById(realm, id); if (user == null) {