The Shaikh and Imaam, Abdul-Lateef bin Abdur-Rahmaan bin Hasan Aal Shaikh - may Allaah have mercy upon them all - said, in powerful words that uncover the confusing doubts in this topic and that refute the one who spreads them from amongst the ignoramuses:
... And those people - those who are under trial - do not know that with the exception of Umar bin Abdul-Azeez and whoever Allaah willed from among the Banee Umayyah - great mishaps, insolence, taking up arms [against the people] and corruption occurred from most of those in charge [wullaat] of the people of Islaam from the time of Yazeed bin Mu'aawiyah [till the present]. But along with that, the manner and behaviour of the notable scholars and mighty leaders with the rulers is well-known and renowned - they do not raise a hand against giving obedience in that which Allaah and His Messenger have commanded from among the legislated actions and obligatory duties of Islaam.
And I will give you an example - that of al-Hajjaaj bin Yoosuf ath-Thaqafee, and his affair is well known in the ummah - that of oppression, repression, excessiveness in spilling the blood [of the Muslims], desecration of the Sanctities of Allaah, the killing of whomever he killed amongst the notables of the ummah such as Sa'eed bin Jubair, the besieging of Ibn az-Zubair even though he had sought refuge in the Haram, and making lawful the sacred and sanctified, the killing of Ibn az-Zubair - even though Ibn az-Zubair had given obedience to him and the people of Makkah, Medinah, Yemen, and most of Iraaq had given the pledge of allegiance to him [Ibn az-Zubair] and al-Hajjaaj was only a deputy of Marwaan, and then of his son Abdul-Malik and none of the khulafaa' (successors) had given Marwaan a pledge and none of the influential people, those with power, had given the pledge of allegiance to him (Marwaan). And along with all of this none of the People of Knowledge hesitated in obeying him and complying with him in that in which obedience is permissible from amongst the pillars of Islaam and its obligations.
And Ibn 'Umar and whoever met al-Hajjaaj were from amongst the Companions of Allaah's Messenger (sallallaahu 'alaihi wasallam), and they never contested with him and nor did they prevent obdedience to him in that by which Islaam is established and by which eemaan is perfected. And it is likewise for those who were also in the era of al-Hajjaaj from among the taab'ieen such as Ibn al-Musayyib, al-Hasan al-Basree, Ibn Seereen, Ibraaheem at-Taimee and those like them from among the leaders of the ummah.
And the affair continued like this between the leading scholars of the ummah - they would enjoin obedience to Allaah and His Messenger and making jihaad in His path along with every leader [imaam] whether righteous or sinful, as is well known in the books of the fundamental principles and beliefs of the religion.
And similarly, Banu al-'Abbaas, they conquered the lands of the Muslims forcefully, with the sword - and not one of the People of Knowledge and Religion aided them in that - and they killed hordes of people and many of the creation from among the Banu Umayyah, their leaders and their deputies. And they killed Ibn Hubairah, the ameer of Iraaq and they also killed Marwaan, the khaleefah - and it was reported that the murderers killed around eighty people from the Banu Umayyah in a single day - and then they placed their blankets above the corpses, sat upon them and then called for food and drink.
So along with all of that the conduct of the leading scholars - such as al-'Awzaa'ee, Maalik, al-Layth ibn Sa'd, 'Ataa bin Abee Rabaah - with those kings is not hidden from the one who has a share in knowledge and realisation.
And then next generation of the People of Knowledge such as Ahmad bin Hanbal, Muhammad bin Ismaa'eel [al-Bukhari], Muhammad bin Idrees [ash-Shaafi'ee], Ahmad bin Nooh, Ishaaq bin Raahawaih and their brothers ... their occurred in their time what occurred from the kings of the great innovations and the denial of the Sifaat and they were called to [affirm] these things and were put to trial by them] and whoever was killed, was killed such as Ahmad bin Nasr. But along with all of this it is not known that a single one of them raised his hand against obedience [to those kings] and that he saw fit to attack them...
Source: Ad-Durar as-Sunniyyah fil Ajwibat un-Najdiyyah (7/177-178).