The Messenger of Allah ﷺ said, "Whoever does not face the qiblah nor turn his back to it when relieving himself, a good deed is recorded for him and a bad deed is erased from him."
قال رسول الله ﷺ: من لم يستقبل القبلة، ولم يستدبرها في الغائط، كتب له حسنة، ومحي عنه سيئة.
No references are available.
Tabarani reported it in Al-Awsat (1343), saying, Ahmad narrated to us, saying, Ahmad bin Harb Mawsili narrated to us, saying, Qasim bin Yazid Jarmi narrated to us, from Ibrahim bin Tahman, from Husayn Muallim, from Yahya bin Abu Kathir, from Abu Salama, from Abu Hurairah, and he related the hadith.Munziri said in Targhib (1/136), "Tabarani reported it, and its narrators are the narrators of the sahih." I say, it is not as he said, for Tabarani's teacher and his teacher's teacher are not among the men of the sahih. Haythami did well in Majma al-Zawaid (1014) when he said, "Tabarani reported it in Al-Awsat, and its men are the men of the sahih except for Tabarani's teacher and his teacher's teacher, and both of them are trustworthy."I say, Tabarani's teacher is Ahmad, unattributed, but he is identified by what was mentioned before him with his attribution, namely that he is Ahmad bin Muhammad bin Abdullah bin Sadaqah, who is Abu Bakr Baghdadi, the imam and hadith master, who died in the year 293. See Tarikh Baghdad (5/40). His teacher is Ahmad bin Harb Mawsili Tai, among the men of Taqrib, "truthful," and only Nasai narrated from him.