'Several Filters in Cognito ListUsers

I'm trying to filter in my presignup lambda for a few params (in the same call) with Cognito ListUserRequest but it doesn't work. Somebody knows a workaround without making several calls? Thanks a lot!

 ListUsersRequest listUsersRequest = new ListUsersRequest();
 listUsersRequest.withUserPoolId(USER_POOL_ID);
 listUsersRequest.withFilter("username = \"" + USER_NAME + "\" and email = \"" + EMAIL + "\""");


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source