Sahih al-Bukhari, Book 65, Hadith 4699 (In-Book) ⓘ
Narrated Al-Bara bin Azib: Allah's Messenger said, "When a Muslim is questioned in his grave, he will testify that none has the right to be worshipped but Allah and that Muhammad is Allah's Messenger, and that is what is meant by Allah's Statement:-- "Allah will keep firm those who believe with a Word that stands firm in this world and in the Hereafter." (14.27)
حَدَّثَنَا أَبُو الْوَلِيدِ، حَدَّثَنَا شُعْبَةُ، قَالَ أَخْبَرَنِي عَلْقَمَةُ بْنُ مَرْثَدٍ، قَالَ سَمِعْتُ سَعْدَ بْنَ عُبَيْدَةَ، عَنِ الْبَرَاءِ بْنِ عَازِبٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " الْمُسْلِمُ إِذَا سُئِلَ فِي الْقَبْرِ يَشْهَدُ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَنَّ مُحَمَّدًا رَسُولُ اللَّهِ، فَذَلِكَ قَوْلُهُ {يُثَبِّتُ اللَّهُ الَّذِينَ آمَنُوا بِالْقَوْلِ الثَّابِتِ فِي الْحَيَاةِ الدُّنْيَا وَفِي الآخِرَةِ}"
also referenced under: Hadith 4699 (DarusSalam) & Volume 6, Book 60, Hadith 221 (USC-MSA)