It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Prophet (peace and blessings be upon him) said to a man: "Listening and obeying (the ruler) is binding upon you, whether you like it or dislike it, unless you are ordered to commit a sin; for there is no obedience to anyone in disobedience to Allah."
Imam al-Tabarani (may Allah have mercy on him) said: "No one narrated this hadith from Abdullah bin Sa'id bin Abi Hind (may Allah have mercy on him) except al-Mughirah bin Abd al-Rahman (may Allah have mercy on him), and Ya'qub bin Humayd (may Allah have mercy on him) is alone in narrating it."
Hadith Referenceالمعجم الأوسط / باب الميم / 6261
Hadith Takhrij«أخرجه البخاري فى «صحيحه» برقم: 2955، 7144، 7202، 7203، 7205، 7272، ومسلم فى «صحيحه» برقم: 1839، 1867، ومالك فى «الموطأ» برقم: 3601 / 811، 3603، وابن الجارود فى «المنتقى» برقم: 1117، 1175، وابن حبان فى «صحيحه» برقم: 4548، 4552، 4557، 4561، 4565، 4549، والنسائي فى «المجتبى» برقم: 4199 / 2، 4198 / 1، 4217 / 2، والنسائي فى «السنن الكبرى» برقم: 7763، 7762، 7781، 8667، 8671، وأبو داود فى «سننه» برقم: 2626، 2940، والترمذي فى «جامعه» برقم: 1593، 1707، وابن ماجه فى «سننه» برقم: 2864، والبيهقي فى «السنن الكبرى» برقم: 5385، 5417، 5418، 16650، 16661، 16662، 16705، وأحمد فى «مسنده» برقم: 4654، 4759، 5378، 5631، 5875، 6352، 6387، والطيالسي فى «مسنده» برقم: 1992، والحميدي فى «مسنده» برقم: 654، وعبد بن حميد فى «مسنده» برقم: 752، والبزار فى «مسنده» برقم: 5478، 5479، 6107، وعبد الرزاق فى «مصنفه» برقم: 9822، 9823، 20913، وابن أبي شيبة فى «مصنفه» برقم: 34396، والطحاوي فى «شرح مشكل الآثار» برقم: 555، والطبراني فى «الكبير» برقم: 13664، 13921»