The call to begin the dawn prayer was made, and the Messenger of Allah ﷺ saw a man praying the two rakahs of Fajr. He asked him, "Which of your two prayers do you count as the dawn prayer, the one you prayed alone or the one you prayed with us?"
حدثنا محمد بن جعفر حدثنا شعبة عن عاصم الأحول
أقيمت الصلاة صلاة الصبح فرأى رسول الله ﷺ رجلا يصلي ركعتي الفجر فقال له بأي صلاتيك احتسبت بصلاتك وحدك أو صلاتك التي صليت معنا
No references are available.
Its isnad is sahih, and it is found in Muslim 1/494, no. 712, Abu Dawud 1/155, no. 575, and Nasai 2/117, all of them in the Book of Prayer.