static String tenantIdFromPath(final String requestPath) {
        if (StringUtils.isBlank(requestPath)) {
            return null;
        }
        val matcher = PATTERN_TENANTS.matcher(requestPath);
        if (matcher.find()) {
            return matcher.group(1).trim();
        }
        return null;
    }
Tenant id from path.

@param requestPath the request path
@return the string
api/cas-server-core-api-multitenancy/src/main/java/org/apereo/cas/multitenancy/TenantExtractor.java