Sahih Muslim

Sahih Muslim 1857 a

It is recommended for the army to swear allegiance to the ruler when intending to fight, and an account of Bay'at Ar-Ridwan beneath the tree
Arabic hadith text
حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا شُعْبَةُ، عَنْ عَمْرٍو، - يَعْنِي ابْنَ مُرَّةَ - حَدَّثَنِي عَبْدُ اللَّهِ بْنُ أَبِي أَوْفَى، قَالَ كَانَأَصْحَابُ الشَّجَرَةِ أَلْفًا وَثَلاَثَمِائَةٍ وَكَانَتْ أَسْلَمُ ثُمُنَ الْمُهَاجِرِينَ‏.‏
Translation
It has been narrated on the authority of 'Abdullah b. Abu Aufa who said

The Companions of the Tree (i e. those who swore fealty under the tree) were one thousand and three hundred, and the people of Aslam tribe were one-eighth of the Muhajirs.