Abdullah bin Umar reported,

While the people of Quba were performing the dawn prayer, someone came to them and said, "Tonight Quran has been revealed to the Messenger of Allah ﷺ, and he has been commanded to face the Kaabah, so face it." Their faces had been toward Sham, and they turned around toward the Kaabah.

Azami 1923

Sahih

عن عبد الله بن عمرأنه قال

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

الأعظمي 1923صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Description of prayer, the takbir, standing, and recitation
Section
Changing the qibla from Bayt al-Maqdis to the Sacred House of Allah
Numbering
Jami al-Kamil 1923 (2nd edition)
Azami 1923