USC-MSA web (English) : Book 14, Hadith 3
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
حَدَّثَنِي يَحْيَى، عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ مُحَمَّدِ بْنِ يَحْيَى بْنِ حَبَّانَ، عَنْ عَمِّهِ، وَاسِعِ بْنِ حَبَّانَ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّهُ كَانَ يَقُولُ إِنَّ أُنَاسًا يَقُولُونَ إِذَا قَعَدْتَ عَلَى حَاجَتِكَ فَلاَ تَسْتَقْبِلِ الْقِبْلَةَ وَلاَ بَيْتَ الْمَقْدِسِ - قَالَ عَبْدُ اللَّهِ - لَقَدِ ارْتَقَيْتُ عَلَى ظَهْرِ بَيْتٍ لَنَا فَرَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم عَلَى لَبِنَتَيْنِ مُسْتَقْبِلَ بَيْتِ الْمَقْدِسِ لِحَاجَتِهِ ثُمَّ قَالَ لَعَلَّكَ مِنَ الَّذِينَ يُصَلُّونَ عَلَى أَوْرَاكِهِمْ . قَالَ قُلْتُ لاَ أَدْرِي وَاللَّهِ .
Yahya related to me from Malik from Yahya ibn Said from Muhammad ibn Yahya ibn Habban from his paternal uncle, Wasi ibn Habban, that Abdullah ibn Umar said, "People say, 'When you sit to relieve yourself, do not face the qibla or the Bayt al-Maqdis.' " Abdullah continued, "I went upon top of a house of ours and saw the Messenger of Allah (ﷺ) (squatting) on two unfired bricks facing the Bayt al-Maqdis, relieving himself." Ibn Umar added, "Perhaps you are one of those who pray folded on their haunches." Wasi replied, "I don't know, by Allah!"
Full reference and source
USC-MSA web (English) : Book 14, Hadith 3 Arabic : Book 14, Hadith 460
View source on Sunnah.com (opens in a new tab)