Abu Hurairah (May Allah be pleased with him) reported:
Messenger of Allah (ﷺ) said, "Whosoever obeys me, obeys Allah; and he who disobeys me, disobeys Allah; and whosoever obeys the Amir (leader), in fact, obeys me; and he who disobeys the Amir, in fact, disobeys me."[Al-Bukhari and Muslim].
Arabic/English book reference: Book 1, Hadith 671