Narrated Ibn 'Umar:
That the Messenger of Allah (ﷺ) said: Hearing and obeying is required from every Muslim man - in what he like and what he dislikes - as long as he is not ordered with disobedience. If he is ordered with disobedience, then no hearing or obeying is required of him.
[Abu 'Eisa said:] There are narrations on this topic from 'Ali, 'Imran bin Husain, and Al-Hakam bin 'Amr Al-Ghifari. This Hadith is Hasan Sahih.