كتاب الإيمان
1  
The Book of Faith
(4)
Chapter: Explaining the faith by means of which a person is admitted into paradise, and that the one who adheres to what is enjoined upon him will enter paradise
(4)
باب بَيَانِ الإِيمَانِ الَّذِي يُدْخَلُ بِهِ الْجَنَّةُ وَأَنَّ مَنْ تَمَسَّكَ بِمَا أُمِرَ بِهِ دَخَلَ الجَنَّةَ
Sahih Muslim 15 a

It is narrated on the authority of Jabir that Nu'man b. Qaufal came to the Prophet (ﷺ) and said:

Would I enter Paradise if I say the obligatory prayers and deny myself that which is forbidden and treat that as lawful what has been made permissible (by the Shari'ah)? The Prophet (ﷺ) replied in the affirmative.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَأَبُو كُرَيْبٍ - وَاللَّفْظُ لأَبِي كُرَيْبٍ - قَالاَ حَدَّثَنَا أَبُو مُعَاوِيَةَ، عَنِ الأَعْمَشِ، عَنْ أَبِي سُفْيَانَ، عَنْ جَابِرٍ، قَالَ أَتَى النَّبِيَّ صلى الله عليه وسلم النُّعْمَانُ بْنُ قَوْقَلٍ فَقَالَ يَا رَسُولَ اللَّهِ أَرَأَيْتَ إِذَا صَلَّيْتُ الْمَكْتُوبَةَ وَحَرَّمْتُ الْحَرَامَ وَأَحْلَلْتُ الْحَلاَلَ أَأَدْخُلُ الْجَنَّةَ فَقَالَ النَّبِيُّ صلى الله عليه وسلم ‏ "‏ نَعَمْ ‏"‏ ‏.‏
Reference : Sahih Muslim 15a
In-book reference : Book 1, Hadith 16
USC-MSA web (English) reference : Book 1, Hadith 15
  (deprecated numbering scheme)