Jabir bin Abdullah reported,

Sulayk al-Ghatafani came while the Messenger of Allah ﷺ was delivering the sermon. The Prophet ﷺ asked him, "Did you pray two rakahs before coming?"He replied, "No."The Prophet said, "Then pray two rakahs and keep them brief."

Ibn Majah 1114

Daif

حدثنا داود بن رشيد حدثنا حفص بن غياث عن الأعمش عن أبي صالح عن أبي هريرة وعن أبي سفيان

عن جابر قالا

جاء سليك الغطفاني ورسول الله ﷺ يخطب فقال له النبي ﷺ أصليت ركعتين قبل أن تجيء قال لا قال فصل ركعتين وتجوز فيهما

ابن ماجه 1114ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
One who enters the masjid while the imam is delivering the sermon
Numbering
Darussalam 1114
Ibn Majah 1114