Abdullah bin Umar reported,

While the people were performing the dawn prayer at Quba, someone came to them and said, "Revelation was sent down to the Messenger of Allah ﷺ last night, and he has been commanded to face the Kaabah, so face it." Their faces had been turned toward Sham, so they turned around toward the qiblah.

Bukhari 4494

Sahih

حدثنا قتيبة بن سعيد عن مالك عن عبد الله بن دينار

عن ابن عمر قال

بينما الناس في صلاة الصبح بقباء إذ جاءهم آت فقال إن رسول الله ﷺ قد أنزل عليه الليلة وقد أمر أن يستقبل الكعبة فاستقبلوها وكانت وجوههم إلى الشأم فاستداروا إلى القبلة

البخاري 4494صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Tafsir
Chapter
And from wherever you go out, turn your face toward Masjid al-Haram, and wherever you are" to His saying "and that you may be guided
Numbering
Darussalam 4494
Bukhari 4494