Musnad Ahmad 2509
Grading supplied with this record: lts isnad is jayyid]
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
It was narrated from 'Abdullah bin ‘Abbas (عليه السلام) that a son of his died in Qudaid or ‘Usfan and he said:
O Kuraib (go and) see how many people have gathered (to offer the funeral prayer) for him. So I went out and saw that some people had gathered (to offer the funeral prayer) for him. So I told him and he said: Are there forty? I said: Yes. He said: Bring him out, for I heard the Messenger of Allah (ﷺ) say: "There is no Muslim who dies, and forty men who do not associate anything with Allah stand to offer the funeral prayer for him, but Allah will accept their intercession for him.”
Full reference and source
Musnad Ahmad 2509 Arabic/English book : Book 25, Hadith 2509
View source on Sunnah.com (opens in a new tab)