The Prophet ﷺ said, "There is no obedience in disobedience to Allah ."
حدثنا عبد الرحمن أخبرنا همام عن قتادة عن أبي مراية
عن النبي ﷺ قال لا طاعة في معصية الله تبارك وتعالى
Its isnad is sahih. Abu Muraya's name is Abdullah bin Amr Ajli. Ibn Hibban deemed him trustworthy, while the others were silent about him.The hadith was narrated with similar wording by Bukhari, 9/109, in the book of wishing, in the chapter on what has been said regarding accepting a solitary report, by Muslim, 3/1469, no. 1849, in the book of leadership, in the chapter on the obligation of obeying rulers, by Abu Dawud, 3/40, no. 2625, in the book of jihad, in the chapter on obedience, and by Nasai, 7/159, no. 4205, in the book of the pledge of allegiance, in the chapter on the punishment for one who commands disobedience.