Abdullah bin Abbas reported,

I heard the Prophet ﷺ say, "Any Muslim who dies and forty men who associate nothing with Allah stand over his funeral, their intercession for him will be accepted."

Abu Dawud 3170

Sahih

حدثنا الوليد بن شجاع السكوني حدثنا ابن وهب أخبرني أبو صخر عن شريك بن عبد الله بن أبي نمر عن كريب

عن ابن عباس قال

سمعت النبي ﷺ يقول ما من مسلم يموت فيقوم على جنازته أربعون رجلا لا يشركون بالله شيئا إلا شفعوا فيه

أبو داود 3170صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Funerals
Chapter
Virtue of praying over the deceased and accompanying them
Numbering
Darussalam 3170
Abu Dawud 3170