Ibn Jurayj reported,

I said to Ata, "Did you hear Ibn Abbas say, 'You were only commanded to perform tawaf around the House, you were not commanded to enter it'?"He replied, "He did not forbid entering it, but I heard him say, 'Usama bin Zayd informed me that when the Prophet ﷺ entered the House, he supplicated in all of its sides but did not pray inside it until he came out. When he came out, he prayed two rakahs facing the House and said, "This is the qiblah."'"I asked him, "What do you mean by its sides? Was it in its corners?"He answered, "Rather, in each direction of the House."

Azami 3062

Sahih

عن ابن جريج قال

قلت لعطاء: أسمعت ابن عباس يقول: إنما أمرتم بالطواف، ولم تؤمروا بدخوله. قال: لم يكن ينهى عن دخوله، ولكني سمعته يقول: أخبرني أسامة بن زيد: أن النبي ﷺ لما دخل البيت دعا في نواحيه كلها. ولم يصل فيه، حتى خرج. فلما خرج ركع في قبل البيت ركعتين. وقال: هذه القبلة قلت له: ما نواحيها؟ أفي زواياها؟ قال: بل في كل قبلة من البيت.

الأعظمي 3062صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Mosques
Section
Who said the Prophet ﷺ entered a house and did not pray in it
Numbering
Jami al-Kamil 3062 (2nd edition)
Azami 3062