Abdullah bin Umar reported,

While the people of Quba were performing the morning prayer, someone came to them and announced, "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, and they turned around toward the Kaabah.

Nasai 746

Sahih

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

عن ابن عمر قال

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

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