Umm Salama bint Abu Umaya reported,

The Messenger of Allah ﷺ said, "There will be rulers whose actions you will recognize as right and reject as wrong. Whoever recognizes the wrong is absolved, and whoever rejects it is safe, but whoever is pleased with it and follows along is guilty."They asked, "Shall we not fight them?"He replied, "No, not as long as they pray."In another narration, "Whoever hates it is absolved, and whoever rejects it is safe," meaning whoever hates it in his heart and rejects it in his heart.

Azami 7641

Sahih

عن أم سلمة

أن رسول الله ﷺ قال: ستكون أمراء، فتعرفون وتنكرون، فمن عرف برئ، ومن أنكر سلم، ولكن من رضي وتابع قالوا: أفلا نقاتلهم؟ قال: لا ما صلوا. وفي رواية: فمن كره فقد برئ، ومن أنكر فقد سلم. أي من كره بقلبه وأنكر بقلبه.

الأعظمي 7641صحيح
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 7641 (2nd edition)
Azami 7641