The Prophet ﷺ entered the House and made supplication in all its corners, but did not pray inside it. When he came out, he performed two units of prayer facing the Kaabah.
أخبرنا أبو عاصم خشيش بن أصرم النسائي قال حدثنا عبد الرزاق قال أنبأنا ابن جريج عن عطاء قال سمعت ابن عباس يقول
أن النبي ﷺ دخل البيت فدعا في نواحيه كلها ولم يصل فيه حتى خرج منه فلما خرج ركع ركعتين في قبل الكعبة
Muslim narrated it in the Book of Hajj, chapter on the recommendation of entering the Kaaba for the pilgrim and others, etc., hadith no. 1330, from the hadith of Ibn Jurayj through this route, and it is also found in Kubra, hadith no. 3900.