Hadithcore
Bulugh al-Maram, 98

Narrated Abu Ayub (rad):

Allah’s Messenger (ﷺ) “Neither face nor turn your back to the Qiblah while defecating or urinating, but turn towards the east or the west”. [Reported by the As-Sab’a]

وَلِلسَّبْعَةِ مِنْ حَدِيثِ أَبِي أَيُّوبَ ‏- رضى الله عنه ‏- { لَا تَسْتَقْبِلُوا اَلْقِبْلَةَ بِغَائِطٍ وَلَا بَوْلٍ, وَلَكِنْ شَرِّقُوا أَوْ غَرِّبُوا } [1]‏ .‏

References2 variants
In-Book Reference
Book 1, Hadith 116
English Reference
Book 1, Hadith 104
Related hadiths2
Compare isnād across 2 related chains →