Bishr bin Mahan reported,

His father reported that he was sitting in a gathering with the Messenger of Allah ﷺ when the call to prayer was made. The Messenger of Allah ﷺ got up and prayed, then returned, while Mihjan remained in his place and had not prayed with him.The Messenger of Allah ﷺ asked him, "What kept you from praying with the people? Are you not a Muslim man?"He replied, "Of course, Messenger of Allah, but I had already prayed with my family."The Messenger of Allah ﷺ said to him, "When you come, pray with the people, even if you have already prayed."

Azami 2360

Sahih

عن بشر بن محجن

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

الأعظمي 2360صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Congregational prayer
Section
One who prays alone then finds a congregation and prays with them
Numbering
Jami al-Kamil 2360 (2nd edition)
Azami 2360