It is narrated from Sayyiduna Anas (may Allah be pleased with him) that he said: "I was praying facing a grave when Sayyiduna Umar (may Allah be pleased with him) saw me in that state and began calling out: 'The grave! The grave!' I could not understand what he meant, so I raised my head towards the sky (thinking that perhaps he was pointing to the moon or a cloud). Then he explained: 'The grave is right in front of you (that is, do not pray facing a grave).'" According to another chain, al-Hasan al-Basri (may Allah have mercy on him) also transmitted the like of this from Sayyiduna Umar (may Allah be pleased with him) through Sayyiduna Anas (may Allah be pleased with him).
This report is sahih (authentic); Imam al-Bukhari (may Allah have mercy on him) mentioned it in his Sahih in mu'allaq form (without a chain).
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الصلاة / 339
Hadith Gradingمحدثین:إسناده صحيح
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :قال ابن حجر: هَذَا خَبَرٌ صَحِيحٌ عَلَّقَهُ الْبُخَارِيُّ . » «أخرجه البيهقي فى«سننه الكبير» برقم: 4345، وأورده ابن حجر فى "المطالب العالية"،339، وأخرجه عبد الرزاق فى «مصنفه» برقم: 1581، وأخرجه ابن أبى شيبة فى «مصنفه» برقم: 7657، 7658، 37532»