Umm Salama bint Abu Umaya reported,

The Messenger of Allah ﷺ said, "There will be rulers whose actions you will recognize as right and others you will 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."

Muslim 4800

Sahih

حدثنا هداب بن خالد الأزدي حدثنا همام بن يحيى حدثنا قتادة عن الحسن عن ضبة بن محصن

عن أم سلمة

أن رسول الله ﷺ قال ستكون أمراء فتعرفون وتنكرون فمن عرف برئ ومن أنكر سلم ولكن من رضي وتابع قالوا أفلا نقاتلهم قال لا ما صلوا

مسلم 4800صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Leadership
Chapter
Obligation to denounce rulers for what contradicts the Sharia while refraining from fighting them as long as they pray, and similar matters
Numbering
Darussalam 4800
Muslim 4800