It is narrated from Sayyiduna Amr bin Hurayth (may Allah be pleased with him) that he said: "The Prophet (peace and blessings be upon him) would sometimes touch his blessed beard with his hand while in the prayer (whilst attentive in it)."
In the chain of this narration, Mu'ammal bin Isma'il is a narrator who made many mistakes; however, such a slight movement in the prayer, which is called a minor action ('amal qalil), is permissible on the basis of other supporting narrations, and the prayer is not invalidated by it.
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / صفة الصلاة / 489
Hadith Gradingمحدثین:إسناده ضعيف
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :إسنادہ ضعیف » «أخرجه البيهقي فى«سننه الكبير» برقم: 3483، وأبو يعلى فى «مسنده» برقم: 1462، وأورده ابن حجر فى "المطالب العالية"، 489»