Hadithcore
Mishkat al-Masabih, 3673

Wa’il b. Hujr told that Salama b. Yazid al-Ju‘fi questioned God’s Messenger saying, “Prophet (ﷺ) of God, tell us what you command us to do if commanders arise over us who demand of us what is due to them and refuse us what is due to us.” He replied, “Listen and obey, for they are responsible only for what has been laid on them (cf. Al-Qur’an, 24:54) and you for what has been laid on you.” Muslim transmitted it.

وَعَنْ وَائِلِ بْنِ حُجْرٍ قَالَ: سَأَلَ سَلَمَةُ بْنُ يَزِيدَ الْجُعْفِيُّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ فَقَالَ: يَا نَبِيَّ اللَّهِ أَرَأَيْتَ إِنْ قَامَتْ عَلَيْنَا أُمَرَاءُ يَسْأَلُونَا حَقَّهُمْ وَيَمْنَعُونَا حَقَّنَا فَمَا تَأْمُرُنَا؟ قَالَ: «اسْمَعُوا وَأَطِيعُوا فَإِنَّمَا عَلَيْهِمْ مَا حُمِّلُوا وَعَلَيْكُمْ مَا حُمِّلْتُمْ» . رَوَاهُ مُسلم

References1 variant
In-Book Reference
Book 18, Hadith 13