It has been narrated on the authority of'Abdullah bin 'Umar who said: We used to take oath to the Messenger of Allah (ﷺ) that we would listen to and obey his orders. He would tell us (to say in the oath): As far as it lies in my power.
Hadith ReferenceSahih Muslim / The Book on Government / Hadith: 1867