The Prophet ﷺ said, "It is the duty of the Muslim to listen and obey, in what he likes and what he dislikes, unless he is commanded to commit a sin. If he is commanded to commit a sin, then there is no listening and no obedience."
حدثنا قتيبة بن سعيد حدثنا ليث عن عبيد الله عن نافع
عن النبي ﷺ أنه قال على المرء المسلم السمع والطاعة فيما أحب وكره إلا أن يؤمر بمعصية فإن أمر بمعصية فلا سمع ولا طاعة