Sahih al-Bukhari 695
وَقَالَ الزُّبَيْدِيُّ قَالَ الزُّهْرِيُّ لاَ نَرَى أَنْ يُصَلَّى خَلْفَ الْمُخَنَّثِ إِلاَّ مِنْ ضَرُورَةٍ لاَ بُدَّ مِنْهَا.
Abu Abdullah said: And Muhammad bin Yusuf said to us, and Auza'i narrated to us, (he said:) Zuhri told us. He narrated from Humaid bin Abdur Rahman, Humaid from Ubaidullah bin Adi bin Khiyar, that he went to Hazrat Uthman bin Affan (ra) while he was besieged, and said: You are the Imam of the Muslims, and we see the calamity that has befallen you, and the ringleader of the sedition leads us in prayer, and this is hard for us. He said: Prayer is the best deed that people do. So when people do good, you too do good along with them, and when they do evil, keep away from their evil. And Zubaidi said: Zuhri used to say: We do not hold that prayer should be offered behind an effeminate man (Mukhannath), except out of a necessity for which there is no other way.
AI-translated by Islam-Today