I came to the Messenger of Allah ﷺ at Muzdalifa as he was going out to pray. I said, "Messenger of Allah, I have come from the two mountains of Tayyi. I have exhausted my mount and worn myself out. By Allah, I did not leave a single hill without stopping at it. Is there a valid pilgrimage for me?"The Messenger of Allah ﷺ said, "Whoever attends this prayer of ours and stands with us until we depart, having already stood at Arafah before this, by night or by day, has completed his pilgrimage and fulfilled its rites."
حدثنا ابن أبي عمر حدثنا سفيان عن داود بن أبي هند وإسمعيل بن أبي خالد وزكريا بن أبي زائدة عن الشعبي
أتيت رسول الله ﷺ بالمزدلفة حين خرج إلى الصلاة فقلت يا رسول الله إني جئت من جبلي طيئ أكللت راحلتي وأتعبت نفسي والله ما تركت من حبل إلا وقفت عليه فهل لي من حج فقال رسول الله ﷺ من شهد صلاتنا هذه ووقف معنا حتى ندفع وقد وقف بعرفة قبل ذلك ليلا أو نهارا فقد أتم حجه وقضى تفثه
[Sahih] Nasai also narrated it: 5/263, no. 3042, Rites of Hajj, chapter, "Concerning one who does not reach the Fajr prayer with the imam at Muzdalifa," from the hadith of Sufyan bin Uyayna, with the same wording. Ibn Khuzayma graded it sahih: 4/256, as did Ibn Hibban (no. 3839, 3840) (al-Ihsan), and Hakim: 1/463, and Dhahabi.