Waail bin Hajar reported,

Salama bin Yazid Jafi asked the Messenger of Allah ﷺ, "Prophet of Allah, what is your command if rulers come to power over us who demand their rights from us but withhold our rights from us? What do you order us to do?"He turned away from him. Then he asked again, and he turned away from him. Then he asked a second or third time, and Ashath bin Qays pulled him back and said, "Listen and obey, for upon them is what they have been charged with, and upon you is what you have been charged with."

Muslim 4782

Sahih

حدثنا محمد بن المثنى ومحمد بن بشار قالا حدثنا محمد بن جعفر حدثنا شعبة عن سماك بن حرب

عن علقمة بن وائل الحضرمي عن أبيه قال

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

مسلم 4782صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Leadership
Chapter
Obedience to rulers even if they withhold rights
Numbering
Darussalam 4782
Muslim 4782