One day he was with the Messenger of Allah ﷺ along with a group of his companions when the Messenger of Allah ﷺ turned to them and said, "All of you, do you not know that I am the Messenger of Allah to you?"They replied, "Of course, we bear witness that you are the Messenger of Allah."He asked, "Do you not know that Allah has revealed in His Book that whoever obeys me has obeyed Allah?"They replied, "Of course, we bear witness that whoever obeys you has obeyed Allah, and that obedience to you is part of obedience to Allah."He said, "Then part of obeying Allah is that you obey me, and part of obeying me is that you obey your leaders. Obey your leaders, for if they pray sitting, then pray sitting."
حدثنا أبو النضر حدثنا عقبة يعني ابن أبي الصهباء حدثنا سالم بن عبد الله بن عمر أن
أنه كان ذات يوم عند رسول الله ﷺ مع نفر من أصحابه فأقبل عليهم رسول الله ﷺ فقال يا هؤلاء ألستم تعلمون أني رسول الله إليكم قالوا بلى نشهد أنك رسول الله قال ألستم تعلمون أن الله أنزل في كتابه من أطاعني فقد أطاع الله قالوا بلى نشهد أنه من أطاعك فقد أطاع الله وأن من طاعة الله طاعتك قال فإن من طاعة الله أن تطيعوني وإن من طاعتي أن تطيعوا أئمتكم أطيعوا أئمتكم فإن صلوا قعودا فصلوا قعودا
Its isnad is sahih. It appears in Majma al-Zawaid 2:67, where it is stated, "Ahmad and Tabarani related it in al-Kabir, and its narrators are trustworthy." Tirmidhi alluded to it in 1:287, in his statement "and on this subject." Suyuti also mentioned it in Durr Manthur 2:185, but he attributed it only to Ibn Munzir and Khatib, failing to attribute it to the Musnad.