Sunan Abi Dawud, Hadith 2934

Narrated Ibn 'Umar: We used to take the oath of allegiance to the Prophet to hear and obey, and he would tell: In What I am able.

حَدَّثَنَا حَفْصُ بْنُ عُمَرَ، حَدَّثَنَا شُعْبَةُ، عَنْ عَبْدِ اللَّهِ بْنِ دِينَارٍ، عَنِ ابْنِ عُمَرَ، قَالَ كُنَّا نُبَايِعُ النَّبِيَّ صلى الله عليه وسلم عَلَى السَّمْعِ وَالطَّاعَةِ وَيُلَقِّنُنَا فِيمَا اسْتَطَعْتَ ‏.‏

sunnah.com

also referenced under: Hadith 2940 (DarusSalam)