Yuhanis reported,

Hakam bin Abdullah bin Araj reported that Maqil bin Yasar said, "I can still picture myself on the Day of the Tree, with the Prophet ﷺ receiving the people's pledge of allegiance while I held up one of the tree's branches above his head. We were fourteen hundred men."He added, "We did not pledge to him that we would die, but we pledged that we would not flee."

Muslim 4818

Sahih

و حدثناه يحيى بن يحيى أخبرنا خالد بن عبد الله عن يونس بهذا الإسناد

مسلم 4818صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Leadership
Chapter
Recommendation of pledging allegiance to the commander of the army when intending to fight, and description of the pledge of Ridwan under the tree
Numbering
Darussalam 4818