Abdullah bin Umar reported,

On the day of Hudaybiyah, the people were with the Prophet ﷺ and had scattered in the shade of the trees. Suddenly the people gathered closely around the Prophet ﷺ.Umar said, "Abdullah, go see what is happening with the people, why they have gathered around the Messenger of Allah ﷺ."He found them giving the pledge of allegiance, so he gave the pledge himself, then returned to Umar, who went out and gave the pledge as well.

Bukhari 4187

Sahih

وقال هشام بن عمار حدثنا الوليد بن مسلم حدثنا عمر بن محمد العمري أخبرني نافع

عن ابن عمر رضي الله عنهما

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

البخاري 4187صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Expeditions
Chapter
Expedition of Hudaybiya
Numbering
Darussalam 4187
Bukhari 4187