Someone came to Ibn ʿUmar and said, "Here is Messenger of Allah ﷺ entering the Kaʿba." Ibn ʿUmar said, "I went there but the Prophet ﷺ had come out of the Kaʿba and I found Bilal standing between its two doors. I asked Bilal, 'Did the Prophet ﷺ pray in the Kaʿba?' Bilal replied, 'Yes, he prayed two rakʿat between the two pillars which are to your left on entering the Kaʿba. Then Messenger of Allah ﷺ came out and offered a two-rakʿat prayer facing the Kaʿba.' "
أُتِيَ ابْنُ عُمَرَ فَقِيلَ لَهُ هَذَا رَسُولُ اللَّهِ ﷺ دَخَلَ الْكَعْبَةَ فَقَالَ ابْنُ عُمَرَ فَأَقْبَلْتُ وَالنَّبِيُّ ﷺ قَدْ خَرَجَ وَأَجِدُ بِلاَلاً قَائِمًا بَيْنَ الْبَابَيْنِ فَسَأَلْتُ بِلاَلاً فَقُلْتُ أَصَلَّى النَّبِيُّ ﷺ فِي الْكَعْبَةِ قَالَ نَعَمْ رَكْعَتَيْنِ بَيْنَ السَّارِيَتَيْنِ اللَّتَيْنِ عَلَى يَسَارِهِ إِذَا دَخَلْتَ ثُمَّ خَرَجَ فَصَلَّى فِي وَجْهِ الْكَعْبَةِ رَكْعَتَيْنِ