Abdullah bin Umar reported,

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

Nasai 494

Sahih

أخبرنا قتيبة عن مالك عن عبد الله بن دينار

عن ابن عمر قال

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

النسائي 494صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Prayer
Chapter
Discovery of error after ijtihad
Numbering
Darussalam 494
Nasai 494