كتاب الإيمان
1
The Book of Faith
(11)
Chapter: Evidence that the one who is content with Allah as his Lord, Islam as his religion and Muhammad (saws) as his prophet, then he is a believer, even if he commits major sins
(11)
بَاب الدَّلِيلِ عَلَى أَنَّ مَنْ رَضِيَ بِاللَّهِ رَبًّا وَبِالْإِسْلَامِ دِينًا وَبِمُحَمَّدٍ رَسُولًا فَهُوَ مُؤْمِنٌ وَإِنْ ارْتَكَبَ الْمَعَاصِيَ الْكَبَائِرَ

It is narrated on the authority of 'Abbas b. 'Abdul-Muttalib that he heard the Messenger of Allah saying:

He has found the taste of faith (iman) who is content with Allah as his Lord, with Islam as his religion (code of life) and with Muhammad (ﷺ) as his Prophet.
حَدَّثَنَا مُحَمَّدُ بْنُ يَحْيَى بْنِ أَبِي عُمَرَ الْمَكِّيُّ، وَبِشْرُ بْنُ الْحَكَمِ، قَالاَ حَدَّثَنَا عَبْدُ الْعَزِيزِ، - وَهُوَ ابْنُ مُحَمَّدٍ - الدَّرَاوَرْدِيُّ عَنْ يَزِيدَ بْنِ الْهَادِ، عَنْ مُحَمَّدِ بْنِ إِبْرَاهِيمَ، عَنْ عَامِرِ بْنِ سَعْدٍ، عَنِ الْعَبَّاسِ بْنِ عَبْدِ الْمُطَّلِبِ، أَنَّهُ سَمِعَ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏ "‏ ذَاقَ طَعْمَ الإِيمَانِ مَنْ رَضِيَ بِاللَّهِ رَبًّا وَبِالإِسْلاَمِ دِينًا وَبِمُحَمَّدٍ رَسُولاً ‏"‏ ‏‏
Reference : Sahih Muslim 34
In-book reference : Book 1, Hadith 58
USC-MSA web (English) reference : Book 1, Hadith 54
  (deprecated numbering scheme)