Sunan an-Nasa'i, Volume 5, Book 39, Hadith 4179 (DarusSalam) ⓘ
Jarir said: "I came to the Prophet and said to him: 'I pledge to you to hear and obey in what I like and what I dislike.' The Prophet said: 'Can you do that, O Jarir,' or, 'Are you able for that?' He said: Say: As much as I can.' So he accepted my pledge (for that), and that I be sincere toward every Muslim."
أَخْبَرَنِي مُحَمَّدُ بْنُ قُدَامَةَ، عَنْ جَرِيرٍ، عَنْ مُغِيرَةَ، عَنْ أَبِي وَائِلٍ، وَالشَّعْبِيِّ، قَالاَ قَالَ جَرِيرٌ أَتَيْتُ النَّبِيَّ صلى الله عليه وسلم فَقُلْتُ لَهُ أُبَايِعُكَ عَلَى السَّمْعِ وَالطَّاعَةِ فِيمَا أَحْبَبْتُ وَفِيمَا كَرِهْتُ . قَالَ النَّبِيُّ صلى الله عليه وسلم " أَوَتَسْتَطِيعُ ذَلِكَ يَا جَرِيرُ أَوَتُطِيقُ ذَلِكَ " . قَالَ " قُلْ فِيمَا اسْتَطَعْتُ " . فَبَايَعَنِي وَالنُّصْحِ لِكُلِّ مُسْلِمٍ .
also referenced under: Hadith 4174 (Reference) & Book 39, Hadith 26 (In-Book)