(24) The Chapters on Jihad
كتاب الجهاد
(41) Chapter: The pledge
(41) باب الْبَيْعَةِ
Sunan Ibn Majah 2868 
It was narrated that ‘Attab, the freed slave of Hurmuz, said:
“I heard Anas bin Malik say: ‘We gave our pledge to the Messenger of Allah (ﷺ) on the basis that we would listen and obey. He (ﷺ) said: “As much as you can.”
حَدَّثَنَا عَلِيُّ بْنُ مُحَمَّدٍ، حَدَّثَنَا وَكِيعٌ، حَدَّثَنَا شُعْبَةُ، عَنْ عَتَّابٍ، - مَوْلَى هُرْمُزَ - قَالَ سَمِعْتُ أَنَسَ بْنَ مَالِكٍ، يَقُولُ بَايَعْنَا رَسُولَ اللَّهِ صلى الله عليه وسلم عَلَى السَّمْعِ وَالطَّاعَةِ فَقَالَ ‏ "‏ فِيمَا اسْتَطَعْتُمْ ‏"‏ ‏.‏
Grade :  Hasan (Darussalam)
Reference : Sunan Ibn Majah 2868
In-book reference : Book 24, Hadith 116
English translation : Vol. 4, Book 24, Hadith 2868