Is it permissible to include "Aliyyun waliullah" in Tashahhud during prayers, and am I doing something wrong if I leave it out of my prayers? When and how did this phrase get introduced into the Tashahhud?
1. The phrase : Ashhadu Anna Aliyyan Ameerul Mo’mineen, Ashhadu Anna Aliyyan Waliyyullah, were declared in Athan ( Azan) أذان during the time of the Prophet Muhammad (SAWA) immediately after the declaration of Ghadeer Khum in which the Prophet ( SAWA) said in front of tens of thousands of the companions ( For whomsoever I am the master, Ali is his master). This has been narrated in many Sunni books e.g. Al-Salaafah fi Akhbaar al-Khilaafah , page 36.
In Musnad Ahmad bin Hanbal;) Fadha’il al-Sahabah) that the Prophet saw this statement written on the gates of Paradise : Laa Ilaha illallah, Muhammad Rasoolullah, Aliyyun Akho Rasoolillah), when he was taken in Mi’raaj. مسند احمد بن حنبل
2. Tashahhud has obligatory parts and recommended parts. The obligatory is called Tawqeefi, which is said by the Prophet and his Progeny, Ahlul Bayt. No one is allowed on the obligatory parts of Tashahhud. Recommended parts like Salawaat and Du’a.
3. It is not allowed ( according to most of our Maraaji’ of Taqleed) to add any thing on the obligatory Tashahhud.
4. It is allowed to say: ALLAHUMMA SALLI ALA AMEERIL MO’MINEEN. It is a Du’a and not part of obligatory Tashahhud.
Wassalam.