Sahih al-Bukhari 4584
Sahih al-Bukhari · Book 65: Prophetic Commentary on the Qur'an (Tafseer of the Prophet (pbuh)) · "Obey Allah and obey the Messenger (Muhammad ﷺ ) and those of you (Muslims) who are in authority..." (V.4:59)
Narrated Ibn `Abbas:
حَدَّثَنَا صَدَقَةُ بْنُ الْفَضْلِ ، أَخْبَرَنَا حَجَّاجُ بْنُ مُحَمَّدٍ ، عَنِ ابْنِ جُرَيْجٍ ، عَنْ يَعْلَى بْنِ مُسْلِمٍ ، عَنْ سَعِيدِ بْنِ جُبَيْرٍ ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ {أَطِيعُوا اللَّهَ وَأَطِيعُوا الرَّسُولَ وَأُولِي الأَمْرِ مِنْكُمْ} . قَالَ نَزَلَتْ فِي عَبْدِ اللَّهِ بْنِ حُذَافَةَ بْنِ قَيْسِ بْنِ عَدِيٍّ، إِذْ بَعَثَهُ النَّبِيُّ صلى الله عليه وسلم فِي سَرِيَّةٍ.
The Verse: "Obey Allah and Obey the Apostle and those of you (Muslims) who are in authority." (4.59) was revealed in connection with `Abdullah bin Hudhafa bin Qais bin `Adi' when the Prophet (ﷺ) appointed him as the commander of a Sariyya (army detachment).