Abu Ayub reported,

By Allah, I do not know what to do with these latrines, for the Messenger of Allah ﷺ said, "When one of you goes to relieve himself, whether to defecate or urinate, he should not face the qiblah nor turn his back to it."

Nasai 20

Sahih

أخبرنا محمد بن سلمة والحارث بن مسكين قراءة عليه وأنا أسمع واللفظ له عن ابن القاسم قال حدثني مالك عن إسحق بن عبد الله بن أبي طلحة عن رافع بن إسحق أنه سمع

أبا أيوب الأنصاري وهو بمصر يقول

والله ما أدري كيف أصنع بهذه الكراييس وقد قال رسول الله ﷺ إذا ذهب أحدكم إلى الغائط أو البول فلا يستقبل القبلة ولا يستدبرها

النسائي 20صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Purification
Chapter
Prohibition of facing the qibla when relieving oneself
Numbering
Darussalam 20
Nasai 20