Junada bin Abu Umaya reported,

We visited Ubada bin Samit while he was ill and said, "May Allah restore your health. Narrate to us a hadith, that Allah may benefit you through it, which you heard from the Prophet ﷺ."He said, "The Prophet ﷺ called us and we pledged allegiance to him. Among the terms he took from us was that we pledged to listen and obey, in what we liked and what we disliked, in our hardship and our ease, and even when others were given preference over us, and that we would not contest the authority of those in charge unless you see clear disbelief concerning which you have proof from Allah."

Azami 7635

Sahih

عن جنادة بن أبي أمية قال

دخلنا على عبادة بن الصامت، وهو مريض قلنا: أصلحك الله حدث بحديث- ينفعك الله به- سمعته من النبي ﷺ قال: دعانا النبي ﷺ فبايعناه فقال: فيما أخذ علينا أن بايعنا على السمع والطاعة في منشطنا ومكرهنا، وعسرنا ويسرنا وأثرة علينا، وأن لا ننازع الأمر أهله: إلا أن تروا كفرا بواحا عندكم من الله فيه برهان.

الأعظمي 7635صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Injustice of the ruler and his selfishness do not prevent hearing and obeying
Numbering
Jami al-Kamil 7635 (2nd edition)
Azami 7635