Abu Hurairah reported,

A funeral procession passed by the Prophet ﷺ, and the people spoke well of the deceased. The Prophet ﷺ said, "It has been confirmed."Then another funeral procession passed by, and the people spoke ill of the deceased. The Prophet ﷺ said, "It has been confirmed."They asked, "Messenger of Allah, you said about the first and the second, 'It has been confirmed.'"The Prophet ﷺ replied, "The angels are Allah's witnesses in the heavens, and you are Allah's witnesses on the earth."

Nasai 1935

Sahih

أخبرنا محمد بن بشار قال حدثنا هشام بن عبد الملك قال حدثنا شعبة قال سمعت إبراهيم بن عامر وجده أمية بن خلف قال سمعت عامر بن سعد

عن أبي هريرة قال

مروا بجنازة على النبي ﷺ فأثنوا عليها خيرا فقال النبي ﷺ وجبت ثم مروا بجنازة أخرى فأثنوا عليها شرا فقال النبي ﷺ وجبت قالوا يا رسول الله قولك الأولى والأخرى وجبت فقال النبي ﷺ الملائكة شهداء الله في السماء وأنتم شهداء الله في الأرض

النسائي 1935صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Nasai Sughra
Book
Funerals
Chapter
Praise
Numbering
Darussalam 1935
Nasai 1935