Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bukhari:1369Ḥafṣ b. ʿUmar > Shuʿbah > ʿAlqamah b. Marthad > Saʿd b. ʿUbaydah > al-Barāʾ b. ʿĀzib

The Prophet ﷺ said, "When a faithful believer is made to sit in his grave, then (the angels) come to him and he testifies that none has the right to be worshipped but Allah and Muhammad is Allah's Apostle. And that corresponds to Allah's statement: Allah will keep firm those who believe with the word that stands firm . . . (14.27). Narrated Shu'ba: Same as above and added, "Allah will keep firm those who believe . . . (14.27) was revealed concerning the punishment of the grave."  

البخاري:١٣٦٩حَدَّثَنَا حَفْصُ بْنُ عُمَرَ حَدَّثَنَا شُعْبَةُ عَنْ عَلْقَمَةَ بْنِ مَرْثَدٍ عَنْ سَعْدِ بْنِ عُبَيْدَةَ عَنِ الْبَرَاءِ بْنِ عَازِبٍ ؓ

عَنِ النَّبِيِّ ﷺ قَالَ إِذَا أُقْعِدَ الْمُؤْمِنُ فِي قَبْرِهِ أُتِيَ ثُمَّ شَهِدَ أَنْ لاَ إِلَهَ إِلاَّ اللَّهُ وَأَنَّ مُحَمَّدًا رَسُولُ اللَّهِ فَذَلِكَ قَوْلُهُ {يُثَبِّتُ اللَّهُ الَّذِينَ آمَنُوا بِالْقَوْلِ الثَّابِتِ} حَدَّثَنَا مُحَمَّدُ بْنُ بَشَّارٍ حَدَّثَنَا غُنْدَرٌ حَدَّثَنَا شُعْبَةُ بِهَذَا وَزَادَ {يُثَبِّتُ اللَّهُ الَّذِينَ آمَنُوا} نَزَلَتْ فِي عَذَابِ الْقَبْرِ  


See similar narrations below:

Collected by Suyūṭī
suyuti:1334a

When a Muslim is questioned in the grave he testifies that there is no god but Allah and that Muhammad is Allah’s Apostle. That is verified by Allah’s words: “Allah establishes those who believe with the word that stands firm.” (Using translation from Abū Dāʾūd 4750)   

السيوطي:١٣٣٤a

"إِذَا أُقعِدَ المؤمنُ في قَبْرِه إلى ثمَّ شَهَدَ أن لا إِلَهَ إِلا الله، وأنَّ محمدًا رسولُ الله، فذلك قَوْله: يثبِّتُ اللهُ الذين آمنوا بالقولِ الثابتِ".  

[خ] البخاري عن البراء