I climbed onto the roof of the house and saw the Messenger of Allah ﷺ sitting on two bricks facing Bayt al-Maqdis to relieve himself.
حدثنا عبد الله بن مسلمة عن مالك عن يحيى بن سعيد عن محمد بن يحيى بن حبان عن عمه واسع بن حبان
لقد ارتقيت على ظهر البيت فرأيت رسول الله ﷺ على لبنتين مستقبل بيت المقدس لحاجته
Bukhari also reported it, in the Book of wudu, chapter on one who relieves himself upon two bricks, hadith no. 145, from the hadith of Malik. Muslim also reported it, in the Book of Purification, chapter on cleansing oneself after relieving oneself, hadith no. 266, from the hadith of Yahya bin Saeed Ansari, through the same chain. It is found in the Muwatta (the narration of Yahya bin Yahya Laythi) 1/193, 194.