(18) باب اسْتِحْبَابِ مُبَايَعَةِ الإِمَامِ الْجَيْشَ عِنْدَ إِرَادَةِ الْقِتَالِ وَبَيَانِ بَيْعَةِ الرِّضْوَانِ تَحْتَ الشَّجَرَةِ
It has been narrated on the authority of Abdullah b. Zaid who said:
A person came to him and said: Here is Ibn Hanzala who is making people swear allegiance to him. He (, Abdullah) asked: To what effect? He replied: To the effect that they will die for him. 'Abdullah said: I will never swear allegiance to this effect after the Messenger of Allah (ﷺ).
Reference: Sahih Muslim 1861
In-book reference: Book 33, Hadith 120
USC-MSA web (English) reference(deprecated numbering scheme): Book 20, Hadith 4592