protected String getEntityIdFromRequest(final RequestContext requestContext) {
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(requestContext);
        var entityId = request.getParameter(this.entityIdParameterName);
        if (StringUtils.isBlank(entityId)) {
            val service = argumentExtractor.extractService(request);
            if (service != null && service.getAttributes().containsKey(this.entityIdParameterName)) {
                entityId = service.getFirstAttribute(this.entityIdParameterName, String.class);
            }
        }
        return entityId;
    }
Gets entity id from request.

@param requestContext the request context
@return the entity id from request
support/cas-server-support-saml-mdui/src/main/java/org/apereo/cas/support/saml/mdui/web/flow/SamlMetadataUIParserAction.java