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

It was narrated that 'Ubadah bin As-Samit said: "We pledged to the Messenger of Allah to hear and obey, both in times of ease and hardship, when we felt energetic and when we felt tired, that we would not contend with the orders of whomever was entrusted with it, that we would was entrusted with it, that we would stand firm in the way of truth wherever we may be, and that we would not fear the blame of the blamers." Translation Not Available

Book reference: Sunan An Nisai Book 39 Hadith 4149
Web reference: Sunan An Nisai Volume 5 Book 39 Hadith 4154