The Messenger of Allah ﷺ said, "No one who pledged allegiance under the tree will enter the Fire."
حدثنا حجين ويونس قالا حدثنا الليث بن سعد عن أبي الزبير
عن رسول الله ﷺ أنه قال لا يدخل النار أحد ممن بايع تحت الشجرة
Its isnad is sahih. It is found in Muslim, 4/1942, no. 2496, and in Abu Dawud, 4/213, no. 4653, in the Sunnah chapter, on the Caliphs, and in Tirmidhi, 5/695, no. 3860, in the chapter on Virtues, on what has been said about the merit of those who pledged allegiance under the tree, and he said, hasan sahih.