Abu Hurairah reported,

The Messenger of Allah ﷺ said, "When the imam says, 'Allah hears the one who praises Him,' say, 'Our Lord, to You be all praise.' For whoever's words coincide with the words of the angels will have his past sins forgiven."

Tirmidhi 267

Sahih

حدثنا إسحق بن موسى الأنصاري حدثنا معن حدثنا مالك عن سمي عن أبي صالح

عن أبي هريرة

أن رسول الله ﷺ قال إذا قال الإمام سمع الله لمن حمده فقولوا ربنا ولك الحمد فإنه من وافق قوله قول الملائكة غفر له ما تقدم من ذنبه

الترمذي 267صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami Tirmidhi
Book
Prayer
Chapter
Another narration of this
Numbering
Darussalam 267
Tirmidhi 267