Ubada bin Samit reported,

We pledged allegiance to the Messenger of Allah ﷺ to listen and obey, in ease and hardship, in what we like and what we dislike, not to dispute authority with those entrusted with it, and to speak, or to stand for, the truth wherever we are, fearing no one's blame in the cause of Allah.

Azami 7617

Sahih

عن عبادة بن الصامت قال

بايعنا رسول الله على ﷺ السمع والطاعة في اليسر والعسر والمنشط والمكره، وأن لا ننازع الأمر أهله، وأن نقول- أو نقوم- بالحق حيث ما كنا، لا نخاف في الله لومة لائم.

الأعظمي 7617صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Obligation of obeying those in authority in matters that are not disobedience to Allah
Numbering
Jami al-Kamil 7617 (2nd edition)
Azami 7617