Someone passed by a solitary grave with the Messenger of Allah ﷺ, and he led them in prayer there, with a row formed behind him.I asked, "Who was this, Abu Amr?"He replied, "Ibn Abbas."
أخبرنا إسمعيل بن مسعود قال حدثنا خالد عن شعبة عن سليمان الشيباني
من مر مع رسول الله ﷺ على قبر منتبذ فأمهم وصف خلفه قلت من هو يا أبا عمرو قال ابن عباس
Bukhari reported it, in adhan, chapter on the ghusl of children and when it becomes obligatory upon them for ghusl and purification, etc., no. 857, and Muslim, in funerals, chapter on prayer over the grave, no. 954, from the hadith of Shubah with the same wording, and it is also in Kubra, no. 2150. Khalid is Ibn Harith.