"You who believe, obey Allah and obey the Messenger" [Nisa 4:59]. He said, "It was revealed concerning Abdullah bin Huzafa bin Qays bin Adi, whom the Messenger of Allah ﷺ had sent on a military expedition."
أخبرنا الحسن بن محمد قال حدثنا حجاج قال قال ابن جريج أخبرني يعلى بن مسلم عن سعيد بن جبير
{يا أيها الذين آمنوا أطيعوا الله وأطيعوا الرسول} قال نزلت في عبد الله بن حذافة بن قيس بن عدي بعثه رسول الله ﷺ في سرية
Bukhari narrated it in the Book of Tafsir, chapter "Obey Allah and Obey the Messenger... etc," hadith no. 4584, and Muslim narrated it in the Book of Leadership, chapter on the obligation of obeying rulers in matters other than sin and its prohibition in matters of sin, hadith no. 1834, from the hadith of Hajjaj bin Muhammad, with the same wording. It is also found in Al-Kubra, hadith no. 7817.