@SuppressWarnings({"unchecked", "rawtypes"})
    private static Object extractClaim(Map<String, Object> claims, String[] claimPath) {
        for (int i = 0; i < claimPath.length - 1; i++) {
            if (claims.get(claimPath[i]) instanceof Map next) {
                claims = next;
            } else {
                return null;
            }
        }
        return claims.get(claimPath[claimPath.length - 1]);
    }
The path to the claim to extract user display name
server/src/main/java/com/epam/aidial/core/server/security/IdentityProvider.java