In one narration the wording is: "There is no obedience to anyone in disobedience to Allah Almighty." The Companion who had become commander (that is, governor) replied: "Yes!"
This narration has been recorded by Imam Ahmad in this way as a mursal narration. Its chain contains one narrator, Ata' bin al-Sa'ib, who had suffered from confusion (ikhtilat).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الخلافة / 9148