Abdullah bin Dinar narrates: Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) stated that once people were offering the morning prayer in Quba. During this, a person came to them and said: The Qur’an was revealed to Allah’s Messenger last night: He has been commanded to turn his face towards the Ka’bah, so you should also turn your faces towards it. At that time, their faces were towards Syria, so they turned around and faced the Ka’bah.
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 1715
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «الإرواء» (1/ 322 / 290): ق.فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح على شرطهما