It is narrated from Sayyiduna Yazid bin Thabit al-Ansari (may Allah be pleased with him); his nephew Kharijah bin Zayd narrates that one day they went out with the Messenger of Allah (peace and blessings be upon him) with a funeral, until when they reached al-Baqi', he (peace and blessings be upon him) asked: "What is this?" The people said: "This is so-and-so, the freed slave-woman of such-and-such tribe." He (peace and blessings be upon him) recognised her and said: "Why did you not inform me?" The people said: "We buried her at midday while you were taking your midday rest and sleeping, so we did not think it right to trouble you." He (peace and blessings be upon him) stood up, lined the people up in rows behind him and said four takbirs over her, then said: "As long as I am among you, if anyone of you dies, you must inform me, for my prayer over him is a mercy for him."
Hadith Referenceالمعجم الكبير للطبراني / باب الياء / 18847