diff --git a/rest/admin-ui-ext/src/main/java/org/keycloak/admin/ui/rest/AuthenticationManagementResource.java b/rest/admin-ui-ext/src/main/java/org/keycloak/admin/ui/rest/AuthenticationManagementResource.java index 5e78ffdd93..234ec652c9 100644 --- a/rest/admin-ui-ext/src/main/java/org/keycloak/admin/ui/rest/AuthenticationManagementResource.java +++ b/rest/admin-ui-ext/src/main/java/org/keycloak/admin/ui/rest/AuthenticationManagementResource.java @@ -105,7 +105,8 @@ public class AuthenticationManagementResource extends RoleMappingResource { if ("idp".equals(type)) { final Stream identityProviders = realm.getIdentityProvidersStream(); - return identityProviders.filter(idp -> idp.getFirstBrokerLoginFlowId().equals(flow.getId())) + return identityProviders.filter(idp -> flow.getId().equals(idp.getFirstBrokerLoginFlowId()) + || flow.getId().equals(idp.getPostBrokerLoginFlowId())) .map(IdentityProviderModel::getAlias).filter(f -> f.contains(search)) .skip("".equals(search) ? first : 0).limit(max).collect(Collectors.toList()); } diff --git a/rest/admin-ui-ext/src/main/java/org/keycloak/admin/ui/rest/model/AuthenticationMapper.java b/rest/admin-ui-ext/src/main/java/org/keycloak/admin/ui/rest/model/AuthenticationMapper.java index 25871befc8..1e4d52533f 100644 --- a/rest/admin-ui-ext/src/main/java/org/keycloak/admin/ui/rest/model/AuthenticationMapper.java +++ b/rest/admin-ui-ext/src/main/java/org/keycloak/admin/ui/rest/model/AuthenticationMapper.java @@ -3,6 +3,7 @@ package org.keycloak.admin.ui.rest.model; import java.util.List; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.keycloak.models.AuthenticationFlowModel; import org.keycloak.models.ClientModel; import org.keycloak.models.IdentityProviderModel; @@ -22,7 +23,8 @@ public class AuthenticationMapper { authentication.setBuiltIn(flow.isBuiltIn()); authentication.setDescription(flow.getDescription()); - final List usedByIdp = identityProviders.filter(idp -> idp.getFirstBrokerLoginFlowId().equals(flow.getId())) + final List usedByIdp = identityProviders.filter(idp -> flow.getId().equals(idp.getFirstBrokerLoginFlowId()) + || flow.getId().equals(idp.getPostBrokerLoginFlowId())) .map(IdentityProviderModel::getAlias).limit(MAX_USED_BY).collect(Collectors.toList()); if (!usedByIdp.isEmpty()) { authentication.setUsedBy(new UsedBy(UsedBy.UsedByType.SPECIFIC_PROVIDERS, usedByIdp));