protected String getIdentityProviderEntityId(final SAML2Client saml2Client) {
        saml2Client.init();
        val configuration = saml2Client.getConfiguration();
        var identityProviderEntityId = configuration.getIdentityProviderEntityId();
        if (org.apache.commons.lang3.StringUtils.isBlank(identityProviderEntityId)) {
            val identityProviderMetadataResolver = configuration.getIdentityProviderMetadataResolver();
            identityProviderMetadataResolver.resolve(true);
            identityProviderEntityId = identityProviderMetadataResolver.getEntityId();
        }
        LOGGER.debug("Resolved SAML2 identity provider entity id as [{}]", identityProviderEntityId);
        return identityProviderEntityId;
    }
This is {@link SamlIdPDelegatedClientAuthenticationRequestCustomizer}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp-web/src/main/java/org/apereo/cas/support/saml/web/idp/delegation/SamlIdPDelegatedClientAuthenticationRequestCustomizer.java