When we sat with the Prophet ﷺ during prayer, we used to say, "Peace be upon Allah before His servants. Peace be upon Jibreel. Peace be upon Mikail. Peace be upon so-and-so. Peace be upon so-and-so."The Messenger of Allah ﷺ heard us and said, "Allah Himself is As-Salam (Peace). So when one of you sits during the prayer, let him say, 'All greetings, prayers, and good deeds belong to Allah. Peace be upon you, Prophet, and the mercy of Allah and His blessings. Peace be upon us and upon the righteous servants of Allah.' When he says this, it reaches every righteous servant in the heavens and the earth. 'I bear witness that there is no god but Allah, and I bear witness that Muhammad is His servant and messenger.' Then he may choose whatever supplication he wishes after that."
حدثنا أبو معاوية حدثنا الأعمش عن شقيق بن سلمة
كنا إذا جلسنا مع النبي ﷺ في الصلاة قلنا السلام على الله قبل عباده السلام على جبريل السلام على ميكائيل السلام على فلان السلام على فلان قال فسمعنا رسول الله ﷺ فقال إن الله هو السلام فإذا جلس أحدكم في الصلاة فليقل التحيات لله والصلوات والطيبات السلام عليك أيها النبي ورحمة الله وبركاته السلام علينا وعلى عباد الله الصالحين فإذا قالها أصابت كل عبد صالح في السماء والأرض أشهد أن لا إله إلا الله وأشهد أن محمدا عبده ورسوله ثم يتخير بعد من الدعاء ما شاء