We used to take oath to the Messenger of Allah (ﷺ) that we would listen to and obey his…

Sahih Muslim Book 33 Hadith 132

Sahih Muslim #1867

The Book on Government 33:132

It has been narrated on the authority of Abdullah b. '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.

Chapter: Oath of allegiance pledging to hear and obey as much as possible

Grade: Sahih