It is narrated from Sayyiduna Ibn Mas'ud (may Allah be pleased with him): Before the tashahhud was made obligatory, we used to say: 'As-salamu alallah, as-salamu ala Jibrila wa Mika'il' (Peace be upon Allah, peace be upon Jibril and Mika'il). So the Messenger of Allah (peace and blessings be upon him) said: "Do not say it like this, for Allah Almighty is Himself al-Salam. Rather say: 'At-tahiyyatu lillahi was-salawatu wat-tayyibat, as-salamu alayka ayyuhan-Nabiyyu wa rahmatullahi wa barakatuh, as-salamu alayna wa ala ibadillahis-salihin, ashhadu an la ilaha illallah, wa ashhadu anna Muhammadan abduhu wa rasuluh' (All acts of worship, prayers and glorifications are for Allah. Peace be upon you, O Prophet, and His mercy and blessings, and peace be upon us and upon the righteous servants of Allah. I bear witness that there is no god but Allah, and I bear witness that Muhammad (peace and blessings be upon him) is the servant of Allah and His Messenger)."
Ali (bin Umar al-Daraqutni) said: This chain is sahih (authentic).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2819