The Messenger of Allah ﷺ said, "No one who pledged allegiance under the tree will enter the Fire."
حدثنا قتيبة حدثنا الليث عن أبي الزبير
قال رسول الله ﷺ لا يدخل النار أحد ممن بايع تحت الشجرة
[Its isnad is sahih] Abu Dawud narrated it in Sunan Abu Dawud, chapter on the caliphs, no. 4653, from Qutayba with the same chain. Muslim narrated it, no. 2496, from the hadith of Jabir bin Abdullah, from Umm Mubashir, with the same content.