Sahih Muslim 1709 e
It has been narrated on the authority of" Ubida who learnt the tradition from his father who, in turn, learnt it from his own father. 'Ubada's grandfather said:
The Messenger of Allah (ﷺ) took an oath of allegiance from us on our listening to and obeying the orders of our commander in adversity and prosperity, in pleasure and displeasure (and even) when somebody is given preference over us, on our avoiding to dispute the delegation of powers to a person deemed to be a fit recipient thereof (in the eye of one who delegates it) and on our telling the truth in whatever position we be without fearing in the matter ef Allah the reproach of the reproacher.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ إِدْرِيسَ، عَنْ يَحْيَى بْنِ سَعِيدٍ، وَعُبَيْدِ اللَّهِ بْنِ عُمَرَ عَنْ عُبَادَةَ بْنِ الْوَلِيدِ بْنِ عُبَادَةَ، عَنْ أَبِيهِ، عَنْ جَدِّهِ، قَالَ بَايَعْنَا رَسُولَ اللَّهِ صلى الله عليه وسلم عَلَى السَّمْعِ وَالطَّاعَةِ فِي الْعُسْرِ وَالْيُسْرِ وَالْمَنْشَطِ وَالْمَكْرَهِ وَعَلَى أَثَرَةٍ عَلَيْنَا وَعَلَى أَنْ لاَ نُنَازِعَ الأَمْرَ أَهْلَهُ وَعَلَى أَنْ نَقُولَ بِالْحَقِّ أَيْنَمَا كُنَّا لاَ نَخَافُ فِي اللَّهِ لَوْمَةَ لاَئِمٍ ‏.‏