Mishkat al-Masabih 909
وَعَنْ عَبْدِ اللَّهِ بْنِ مَسْعُودٍ قَالَ: كُنَّا إِذَا صَلَّيْنَا مَعَ النَّبِيِّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ قُلْنَا السَّلَامُ عَلَى اللَّهِ قبل عباده السَّلَام على جِبْرِيل السَّلَام على مِيكَائِيل السَّلَام على فلَان وَفُلَان فَلَمَّا انْصَرَفَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَقْبَلَ عَلَيْنَا بِوَجْهِهِ قَالَ: «لَا تَقُولُوا السَّلَامُ عَلَى اللَّهِ فَإِنَّ اللَّهَ هُوَ السَّلَامُ فَإِذَا جَلَسَ أَحَدُكُمْ فِي الصَّلَاةِ فَلْيَقُلِ التَّحِيَّاتُ لِلَّهِ وَالصَّلَوَاتُ وَالطَّيِّبَاتُ السَّلَامُ عَلَيْكَ أَيُّهَا النَّبِيُّ وَرَحْمَةُ اللَّهِ وَبَرَكَاتُهُ السَّلَامُ عَلَيْنَا وَعَلَى عِبَادِ اللَّهِ الصَّالِحِينَ فَإِنَّهُ إِذَا قَالَ ذَلِكَ أَصَابَ كُلَّ عَبْدٍ صَالِحٍ فِي السَّمَاءِ وَالْأَرْضِ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللَّهُ وَأَشْهَدُ أَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ ثُمَّ لْيَتَخَيَّرْ مِنَ الدُّعَاءِ أَعْجَبَهُ إِلَيْهِ فيدعوه»
And from ʿAbdullah ibn Masʿud, who said: When we prayed with the Prophet ﷺ, we used to say: "Peace be upon Allah before His servants; peace be upon Jibril; peace be upon Mikaʾil; peace be upon so-and-so and so-and-so." When the Prophet ﷺ finished, he turned his face to us and said: "Do not say: 'Peace be upon Allah,' for Allah is as-Salam. When one of you sits in the prayer, let him say: 'All greetings are for Allah, and the prayers and the good things. Peace be upon you, O Prophet, and the mercy of Allah and His blessings. Peace be upon us and upon the righteous servants of Allah' — for when he says that, it reaches every righteous servant in the heaven and the earth — 'I bear witness that there is no god but Allah, and I bear witness that Muhammad is His servant and His Messenger.' Then let him choose whatever supplication he likes most and supplicate with it."