Nafi' reports from Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) said: "Obedience is binding on every Muslim, in what he likes and what he dislikes, as long as he is not ordered to commit a sin; when he is ordered to commit a sin, obedience is not obligatory."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5334