Waail bin Hajar reported,

Salama bin Yazid Jafi asked the Messenger of Allah ﷺ, "Prophet of Allah, what do you command us to do if rulers come to power over us who demand their rights from us but withhold our rights from us?"The Messenger of Allah ﷺ turned away from him. Then he asked him again, and he turned away from him. Then he asked him a second or third time, and Ashath bin Qays pulled him back.The Messenger of Allah ﷺ said, "Listen and obey, for they are accountable for what is placed upon them, and you are accountable for what is placed upon you."In another narration, Ashath bin Qays pulled him back, and the Messenger of Allah ﷺ said, "Listen and obey," and the rest of the hadith.

Azami 7639

Sahih

عن وائل بن حجر قال

سأل سلمة بن يزيد الجعفي رسول الله ﷺ فقال: يا نبي الله، أرأيت إن قامت علينا أمراء يسألونا حقهم ويمنعونا حقنا فما تأمرنا؟ فأعرض عنه، ثم سأله، فأعرض عنه، ثم سأله في الثانية أو في الثالثة فجذبه الأشعث بن قيس وقال: اسمعوا وأطيعوا فإنما عليهم ما حملوا وعليكم ما حملتم. وفي رواية: فجذبه الأشعث بن قيس فقال رسول الله ﷺ: اسمعوا وأطيعوا الحديث.

الأعظمي 7639صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Leadership
Section
Injustice of the ruler and his selfishness do not prevent hearing and obeying
Numbering
Jami al-Kamil 7639 (2nd edition)
Azami 7639