Ali bin Shayban reported,

He was among the delegation. He said, "We set out and came to the Prophet ﷺ. We pledged allegiance to him and prayed behind him. Then we prayed another prayer behind him, and when he completed the prayer, he saw a man praying alone behind the row."He continued, "When the Prophet of Allah ﷺ finished, he stopped and said to him, 'Repeat your prayer. There is no prayer for one who prays behind the row alone.'"

Ibn Majah 1003

Sahih

حدثنا أبو بكر بن أبي شيبة حدثنا ملازم بن عمرو عن عبد الله بن بدر حدثني عبد الرحمن بن علي بن شيبان

عن أبيه علي بن شيبان

وكان من الوفد قال خرجنا حتى قدمنا على النبي ﷺ فبايعناه وصلينا خلفه ثم صلينا وراءه صلاة أخرى فقضى الصلاة فرأى رجلا فردا يصلي خلف الصف قال فوقف عليه نبي الله ﷺ حين انصرف قال استقبل صلاتك لا صلاة للذي خلف الصف

ابن ماجه 1003صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Prayer of a man alone behind the row
Numbering
Darussalam 1003
Ibn Majah 1003