مِشْكَاةُ الْمَصَابِيحِ
Mishkat al-Masabih 3665
The Offices of Commander and Qadi
Section 1
وَعَنْ عَلِيٍّ رَضِيَ اللَّهُ عَنْهُ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: «لَا طَاعَةَ فِي مَعْصِيَةٍ إِنَّمَا الطَّاعَةُ فِي الْمَعْرُوف»
‘Ali reported God’s Messenger as saying, “No obedience is to be given in the case of an act of disobedience to God, obedience is to be given only regarding what is reputable.” (Bukhari and Muslim.)
Mishkat al-Masabih, 3665مُتَّفَقٌ عَلَيْهِ (الألباني)