From Sahih Bukhari (Hadith 4584):
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)
Reference: Bukhari 4584