Chapter 1: The Book of Purification
It was narrated from Rafi' bin Ishaq that he heard Abu Ayyub Al-Ansari say - when he was in Egypt: "By Allah, I do not know what I should do with these Karais (toilets). The Messenger of Allah (ﷺ) said: 'When any one of you goes to defecate or urinate, let him not face toward the Qiblah, nor turn his back towards it."
Sunan an-Nasa'i 20