Sa'id bin al-Musayyab (may Allah have mercy on him) says: I was present with Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) at a funeral. When it was placed in the niche grave, he said: "Bismillah wa fi sabilillah wa 'ala millati Rasulillah" (In the name of Allah, in the path of Allah, and upon the way of the Messenger of Allah (peace and blessings be upon him)). When they began setting the bricks over the niche, he said: "Allahumma ajirha min al-shaytan wa min adhab al-qabr wa min adhab al-nar" (O Allah, protect him from Satan, from the punishment of the grave and from the punishment of the Fire). When the earth had been levelled over it, he stood at one side of the grave and said: "Allahumma jafi al-arda an juththatiha, wa sa''id biruhiha, wa laqqiha minka ridwanan" (O Allah, keep the earth away from his body, raise up his soul, and grant him Your good pleasure). I said to Sayyiduna Ibn Umar (may Allah be pleased with them both): Is this something you heard from the Messenger of Allah (peace and blessings be upon him), or something you have said from your own opinion? He said: In that case I could say whatever I wished! Rather, I heard it from the Messenger of Allah (peace and blessings be upon him) himself.
Abu Ahmad (Ibn Adi) said: This is how it names Idris bin Subayh al-Awdi, but he is in fact Idris bin Yazid al-Awdi; and I know of no one who narrates it other than this Hammad bin Abd al-Rahman, and he narrates little.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الجنائز / 7061