Sayyiduna Abu Hurairah, may Allah be pleased with him, narrated that the Noble Prophet, peace and blessings be upon him, said: When the Imam says "Sami' Allahu liman hamidah," you should say "Allahumma Rabbana wa lakal hamd," for whoever's saying coincides with that of the angels, all his past sins will be forgiven.
Hadith Referenceاللؤلؤ والمرجان / كتاب الصلاة / 229
Hadith Gradingمحدثین:«صحیح»
Hadith Takhrij«صحیح، أخرجه البخاري في: 10 كتاب الأذان: 125 باب فضل اللهم ربنا ولك الحمد»