Attahiyat is a very important 'Dua' we repeat in our daily prayers.
Attahiyat is actually a part of the conversation between Our Creator Allah SWT, and our beloved Prophet Muhammad SAW during his journey of Al Isra Wal Miraj. ... When Prophet Muhammad SAW met Allah SWT, he didn't say 'Assalam aleikum'. What is someone going to say when he meets Allah SWT? We can't wish HIM peace because ALL sources of peace are through HIM. So Prophet Muhammad SAW said:
"Attahiyyaatu Lillahi Was Salawatu Wattayyibatu" (All compliments, all prayer and worship are for Allah) Allah SWT replied: "Assalamu Alaika Ayyuhannabiyyu 'Warahmatullahi Wabarka'tuhu" (Peace be upon you, Oh Prophet and Allah's Mercy and Blessings).
To this, Prophet Muhammad SAW replied: "Assalamu Alaina Wa'ala'Ibadillahis Saa'liheen" (Peace be on us and on all good slaves of Allah) Note* Prophet Muhammad SAW included "us" in his reply... (and on all good slaves of Allah) And listening to this conversation between Allah SWT and His Messenger SAW, the Angels said: "Ash'had'u'un La ilahaillallahu Wa Ash'hadu Anna Muhammadun Abd'uhu Wa Rasooluh" (I bear witness that no one is worthy of worship except Allah And I bear witness that Muhammad is His slave and Messenger).