Hadithcore
Mishkat al-Masabih, 3667

Ibn ‘Umar told that when they swore allegiance to God’s Messenger to hear and obey he was saying to them, “In what you are able.” (Bukhari and Muslim.)

وَعَنِ ابْنِ عُمَرَ رَضِيَ اللَّهُ عَنْهُمَا قَالَ: كُنَّا إِذَا بَايَعْنَا رَسُولِ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ عَلَى السَّمْعِ وَالطَّاعَةِ يَقُولُ لَنَا: «فِيمَا اسْتَطَعْتُمْ»

References1 variant
In-Book Reference
Book 18, Hadith 7