The Messenger of Allah ﷺ said, "Listening and obeying are required of a Muslim, 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 obeying."
حدثنا ابن نمير ومحمد بن عبيد حدثنا عبيد الله عن نافع
أن رسول الله ﷺ قال السمع والطاعة على المرء المسلم فيما أحب أو كره إلا أن يؤمر بمعصية فإن أمر بمعصية فلا سمع ولا طاعة