Abdullah bin Umar reported,

When Abdullah bin Ubayy bin Salul died, his son Abdullah bin Abdullah came to the Messenger of Allah ﷺ and asked him for his shirt so that his father might be shrouded in it, and he gave it to him. Then he asked him to pray over him, so the Messenger of Allah ﷺ stood up to pray over him.Umar rose and took hold of the garment of the Messenger of Allah ﷺ and said, "Messenger of Allah, are you praying over him when Allah has forbidden you to pray over him?"The Messenger of Allah ﷺ replied, "Allah has only given me a choice. He said, 'Ask forgiveness for them or do not ask forgiveness for them. Even if you ask forgiveness for them seventy times' [Tawba 9:80]. And I will exceed seventy."Umar said, "But he is a hypocrite."Still, the Messenger of Allah ﷺ prayed over him, and Allah عز وجل then revealed, "And never pray over any of them who has died, nor stand at his grave" [Tawba 9:84].

Azami 9878

Sahih

عن ابن عمر قال

لما توفي عبد الله بن أبي ابن سلول جاء ابنه عبد الله بن عبد الله إلى رسول الله ﷺ، فسأله أن يعطيه قميصه أن يكفن فيه أباه، فأعطاه، ثم سأله أن يصلي عليه، فقام رسول الله ﷺ ليصلي عليه، فقام عمر فأخذ بثوب رسول الله ﷺ، فقال: يا رسول الله، أتصلي عليه، وقد نهاك الله أن تصلي عليه؟ فقال رسول الله ﷺ: إنما خيرني الله، فقال: {استغفر لهم أو لا تستغفر لهم إن تستغفر لهم سبعين مرة} [التوبة: ٨٠] الآية، و سأزيده على سبعين. قال: إنه منافق، فصلى عليه رسول الله ﷺ، وأنزل الله عز وجل: {ولا تصل على أحد منهم مات أبدا ولا تقم على قبره}[التوبة: ٨٤].

الأعظمي 9878صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Virtues of the Companions and reports about them
Chapter
Virtues and reports of Umar bin Khattab
Section
Umar bin Khattab's agreements with his Lord
Numbering
Jami al-Kamil 9878 (2nd edition)
Azami 9878