Sahih Muslim, Book 33, Hadith 47 (Muslim 4707)

It has been narrated on the authority of Abu Huraira that the Messenger of Allah (ﷺ) said:

Whoso obeys me obeys God; and whose disobeys me disobeys God. Whoso obeys my commander obeys me, and whoso disobeys my commander disobeys me.