Abd al-Rahman bin Abdullah bin Mas'ud narrates from Sayyiduna Abdullah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) gathered us, and I was the last of them to come to him; we were forty men. He (peace and blessings be upon him) said: "You will attain your goals, you will be helped, and victory will be granted to you. Whoever lives to see that, let him fear Allah, enjoin what is good and forbid what is evil, and maintain the ties of kinship. And whoever lies about me deliberately, let him take his seat in the Fire."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5619
Amr bin Maymun (may Allah have mercy on him) narrates from Abdullah (may Allah be pleased with him): We were forty men with the Messenger of Allah (peace and blessings be upon him) in a tent. He (peace and blessings be upon him) said: "Would you be pleased to be a quarter of the people of Paradise?" They said: Yes! Then he (peace and blessings be upon him) said: "Would you be pleased to be a third of the people of Paradise?" They said: Yes. He (peace and blessings be upon him) said: "By Allah, in Whose Hand is my soul, I hope that you will be half of the people of Paradise. That is because none but a Muslim soul will enter Paradise, and compared with the people of shirk you are like a white hair on the hide of a black bull, or like a black hair on the hide of a red bull."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5620
Kurayb narrates from Sayyiduna Abdullah bin Abbas (may Allah be pleased with them both) that his son died at a place called Qudayd or Usfan. Ibn Abbas (may Allah be pleased with them both) said: O Kurayb! See whether people have gathered. I looked and saw that people had gathered. I informed him, and he asked: Are they forty? I said: Yes. He said: Take the funeral out, for I heard the Messenger of Allah (peace and blessings be upon him) say: "Any Muslim who dies and forty people who do not associate anything with Allah stand over his funeral, Allah will accept their intercession for him."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجمعة / 5621