A man greeted the Messenger of Allah ﷺ with the salaam while he was praying, and the Prophet ﷺ returned the greeting with a gesture. When he had finished the prayer, the Prophet ﷺ said to him, "We used to return the salaam during our prayer, but we were forbidden from doing so."
أن رجلا سلم على رسول الله ﷺ وهو في الصلاة، فرد النبي ﷺ إشارة. فلما سلم قال له النبي ﷺ: إنا كنا نرد السلام في صلاتنا فنهينا عن ذلك.
No references are available.
Bazzar narrated it in Kashf Astar (554) from Umar bin Khattab Sijistani, who said, Abdullah bin Salih narrated to us, who said, Layth narrated to me, who said, Muhammad bin Ajlan narrated to me, from Zayd bin Aslam, from Ata bin Yasar, from Abu Saeed Khudri, and he mentioned something similar. Its isnad is hasan because of Abdullah bin Salih, for there is disagreement about him, and the conclusion is that his hadith is graded hasan when supported by corroborating narrations, but he cannot be relied upon on his own, while Muhammad bin Ajlan is "truthful."Haythami said in Majma (2/81), "Bazzar narrated it, and it contains Abdullah bin Salih, the scribe of Layth. Abdullah bin Shuayb bin Layth deemed him trustworthy, saying, 'Trustworthy and reliable,' but the leading scholars, Ahmad and others, deemed him daif."