On the day of the Conquest, the Messenger of Allah ﷺ entered the Kaabah accompanied by Bilal and Uthman bin Shayb, and they closed the door from the inside. When they came out, I asked Bilal where the Messenger of Allah ﷺ had prayed.He told me that when the Messenger of Allah ﷺ entered, he prayed facing forward between the two pillars on his right.Afterwards I blamed myself for not having asked him how many units of prayer the Messenger of Allah ﷺ had performed.
حدثنا عبد الرحمن بن إبراهيم الدمشقي حدثنا عمر بن عبد الواحد عن الأوزاعي حدثني حسان بن عطية حدثني نافع
دخل رسول الله ﷺ يوم الفتح الكعبة ومعه بلال وعثمان بن شيبة فأغلقوها عليهم من داخل فلما خرجوا سألت بلالا أين صلى رسول الله ﷺ فأخبرني أنه صلى على وجهه حين دخل بين العمودين عن يمينه ثم لمت نفسي أن لا أكون سألته كم صلى رسول الله ﷺ
Bukhari narrated it in the Book of Prayer, chapter, "Doors and locking the Kaaba and mosques," hadith no. 468, and others.It was also cross-referenced by Muslim in the Book of Hajj, chapter, "The desirability of entering the Kaaba for the pilgrim and others, praying in it, and supplicating in all its corners," hadith no. 1329, from the hadith of Nafi.