Imām Abū 'Abdullāh Bukhārī said: And Muhammad ibn Yūsuf said to us: Al-Awzā'ī narrated to us, he said: Al-Zuhrī narrated to us, from Humaid ibn 'Abdur-Rahmān, from 'Ubaidullāh ibn 'Adī ibn Khiyār, that he went to 'Uthmān ibn 'Affān, may Allāh be pleased with him, at that time he was confined in his house. He said: Indeed you are the head of all the Muslims, and upon you is that calamity which you see, and a fitnah-raising imām is leading us in prayer, and we are in a difficulty. 'Uthmān said: Prayer is the best good deed of the people, so when the people do good, do good with them, and when they do evil, avoid their evil.
And al-Zubaidī said: Al-Zuhrī narrated that we do not consider it permissible to pray following a mukhannath except in severe necessity.
Reference: Sahih Al Bukhari 695