Ibn Umar was at home when someone said to him, "The Messenger of Allah ﷺ has just entered the Kaabah."Ibn Umar said, "I set out, but by the time I arrived the Messenger of Allah ﷺ had already come out. I found Bilal standing between the two doors, so I asked him, 'Did the Prophet ﷺ pray inside the Kaabah?'Bilal replied, 'Yes. He prayed two rakahs between the two pillars on your left as you enter, then he came out and prayed two rakahs facing the Kaabah.'"
أتى ابن عمر في منزله. فقيل له: هذا رسول الله ﷺ قد دخل الكعبة. قال: فأقبلت فأجد رسول الله ﷺ قد خرج، وأجد بلالا قائما بين البابين. فسألت بلالا، فقلت: أصلى النبي ﷺ في الكعبة؟ قال: نعم. ركعتين بين الساريتين اللتين على يساره إذا دخلت ثم خرج. فصلى في وجه الكعبة ركعتين.
Bukhari narrated it in "Prayer" (397) from Yahya (that is, Ibn Saeed Qattan), and in "Tahajjud" (1167) from Abu Naeem (that is, Fadl bin Dukayn), both of them from Sayf, who said, "I heard Mujahid say" (then he mentioned it). In a narration found in Ibn Khuzayma (3016), by way of Abu Asim from Sayf, "Then he went out and prayed two rakahs between the Hajr and the door."