The Messenger of Allah ﷺ said, "No one who pledged allegiance under the tree will enter the Fire."
حدثنا قتيبة بن سعيد ويزيد بن خالد الرملي أن الليث حدثهم عن أبي الزبير
عن رسول الله ﷺ أنه قال لا يدخل النار أحد ممن بايع تحت الشجرة
[Its isnad is sahih] Reported by Tirmidhi, Chapters on Virtues, chapter on what has been said about the merit of those who gave the pledge under the tree, no. 3860, from Qutayba with this wording, and he said, hasan sahih.