Sunan an-Nasa'i
It was narrated that Abu Hurairah said: "A funeral passed by the Prophet (ﷺ) and they praised (the deceased). The Prophet (ﷺ) said: 'It is granted.' Then another funeral passed by and they criticized (the deceased). The Prophet (ﷺ) said: 'It is granted.' They said: 'O Messenger of Allah, you said in both cases, 'It is granted?' The Prophet (ﷺ) said: 'The angels are the witnesses of Allah in heaven, and you are the witnesses of Allah on Earth."'
أَخْبَرَنَا مُحَمَّدُ بْنُ بَشَّارٍ، قَالَ حَدَّثَنَا هِشَامُ بْنُ عَبْدِ الْمَلِكِ، قَالَ حَدَّثَنَا شُعْبَةُ، قَالَ سَمِعْتُ إِبْرَاهِيمَ بْنَ عَامِرٍ، وَجَدُّهُ، أُمَيَّةُ بْنُ خَلَفٍ قَالَ سَمِعْتُ عَامِرَ بْنَ سَعْدٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ مَرُّوا بِجَنَازَةٍ عَلَى النَّبِيِّ صلى الله عليه وسلم فَأَثْنَوْا عَلَيْهَا خَيْرًا فَقَالَ النَّبِيُّ صلى الله عليه وسلم " وَجَبَتْ " . ثُمَّ مَرُّوا بِجَنَازَةٍ أُخْرَى فَأَثْنَوْا عَلَيْهَا شَرًّا فَقَالَ النَّبِيُّ صلى الله عليه وسلم " وَجَبَتْ " . قَالُوا يَا رَسُولَ اللَّهِ قَوْلُكَ الأُولَى وَالأُخْرَى " وَجَبَتْ " . فَقَالَ النَّبِيُّ صلى الله عليه وسلم " الْمَلاَئِكَةُ شُهَدَاءُ اللَّهِ فِي السَّمَاءِ وَأَنْتُمْ شُهَدَاءُ اللَّهِ فِي الأَرْضِ " .
Grade: Sahih (Darussalam)
Reference