كتاب الصلاة
4  
Prayer
(8a)
Chapter: Mosques and places of Prayer - Section 1
(7)
باب المساجد ومواضع الصلاة - الفصل الأول
Mishkat al-Masabih 689, 690
Ibn ‘Abbas said that when the Prophet entered the House (the Ka’ba) he made supplications in all sides of it, but did not perform salat till he had come out. When he came out he prayed two rak'as facing the Ka'ba and said, “This is the qibla.” Bukhari transmitted it and Muslim transmitted it from Ibn ‘Abbas from Usama b. Zaid.
عَنِ ابْنِ عَبَّاسٍ قَالَ: لَمَّا دَخَلَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ الْبَيْتَ دَعَا فِي نَوَاحِيهِ كُلِّهَا وَلَمْ يُصَلِّ حَتَّى خَرَجَ مِنْهُ فَلَمَّا خَرَجَ رَكَعَ رَكْعَتَيْنِ فِي قُبُلِ الْكَعْبَةِ وَقَالَ: «هَذِه الْقبْلَة» . رَوَاهُ البُخَارِيّ

وَرَوَاهُ مُسْلِمٌ عَنْهُ عَنْ أُسَامَةَ بْنِ زَيْدٍ

  صَحِيح, صَحِيح   (الألباني) حكم   :
Reference : Mishkat al-Masabih 689, 690
In-book reference : Book 4, Hadith 121