ENOfficial
It was narrated from Jabir bin 'Abdullah: "Abu Sa'eed Al-Khudri narrated to me, that he bears witness that the Messenger of Allah (ﷺ) forbade facing the Qiblah when defecating or urinating.'"
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا الْعَبَّاسُ بْنُ الْوَلِيدِ الدِّمَشْقِيُّ، حَدَّثَنَا مَرْوَانُ بْنُ مُحَمَّدٍ، حَدَّثَنَا ابْنُ لَهِيعَةَ، عَنْ أَبِي الزُّبَيْرِ، عَنْ جَابِرِ بْنِ عَبْدِ اللَّهِ، حَدَّثَنِي أَبُو سَعِيدٍ الْخُدْرِيُّ، أَنَّهُ شَهِدَ عَلَى رَسُولِ اللَّهِ ـ صلى الله عليه وسلم ـ أَنَّهُ نَهَى أَنْ نَسْتَقْبِلَ الْقِبْلَةَ بِغَائِطٍ أَوْ بِبَوْلٍ .
sunnah.com