It was narrated that ‘Ata’ said: “I heard Ibn ‘Abbas say:
‘Usamah bin Zaid told me that the Prophet entered the House, and supplicated in all its corners, but he did not pray inside until he came out; when he came out he prayed two Rak’ahs in front of the Ka’bah.” (Sahih)