How to get metadata (in my case mail) of users who have a certain set of metadata?

How to get metadata (in my case mail) of users who have a certain set of metadata?

error code: 523