Allah's Messenger (ﷺ) said, "When the Imam says, 'Sami'Allahu liman hamidah' you should say -
اَللَّهُمَّ رَبَّنَا وَلَكَ الْحَمْدُ
Pronunciation
Allaahumma Rabbanaa wa lakal-hamd
Meaning
O Allah, our Lord and to You be the praise. If the saying of any one of you coincides with that of the angels, all his past sins will be forgiven.
Source: Bukhari: 796
Read the hadith
حَدَّثَنَا عَبْدُ اللَّهِ بْنُ يُوسُفَ، قَالَ أَخْبَرَنَا مَالِكٌ، عَنْ سُمَىٍّ، عَنْ أَبِي صَالِحٍ، عَنْ أَبِي هُرَيْرَةَ ـ رضى الله عنه ـ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِذَا قَالَ الإِمَامُ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ. فَقُولُوا اللَّهُمَّ رَبَّنَا لَكَ الْحَمْدُ. فَإِنَّهُ مَنْ وَافَقَ قَوْلُهُ قَوْلَ الْمَلاَئِكَةِ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ " .
Narrated Abu Huraira: Allah's Messenger (ﷺ) said, "When the Imam says, "Sami`a l-lahu liman hamidah," you should say, "Allahumma Rabbana laka l-hamd." And if the saying of any one of you coincides with that of the angels, all his past sins will be forgiven." [Bukhari: 796]
Duas from IslamicAPI's Masnun Dua dataset (based on the Quran, hadith, Hisnul Muslim and Rahe Belayat). See the dataset