Immigration agents have been given access to a facial recognition app to identify people in the field, according to leaked emails.