Narrated from Abdullah bin Umar (may Allah be pleased with them) that the Messenger of Allah (peace and blessings of Allah be upon him) said: "It is obligatory upon a Muslim to listen and obey as long as he is not commanded to commit a sin, whether he likes it or dislikes it. But if he is commanded to commit a sin, then there is neither listening nor obedience for him." .
Imam Tirmidhi says: 1- This hadith is Hasan Sahih. 2- In this chapter, hadiths have also been narrated from Ali, Imran bin Husain, and Hakam bin Amr al-Ghifari (may Allah be pleased with them).
Hadith Referenceسنن ترمذي / كتاب الجهاد عن رسول الله صلى الله عليه وسلم / 1707