Sunan Abi Dawud 848
Grading supplied with this record: Sahih (Al-Albani)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِذَا قَالَ الإِمَامُ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ فَقُولُوا اللَّهُمَّ رَبَّنَا لَكَ الْحَمْدُ فَإِنَّهُ مَنْ وَافَقَ قَوْلُهُ قَوْلَ الْمَلاَئِكَةِ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ "
Abu Hurairah reported the Messenger of Allah (ﷺ) as saying:
When the Imam says: "Allah listens to him who praised Him," say: "O Allah, our lord, to You be the praise, " for if what anyone says synchronises with what the angels say, he will be forgiven his past sins.
Full reference and source
Sunan Abi Dawud 848 In-book : Book 2, Hadith 458 English translation : Book 2, Hadith 847
View source on Sunnah.com (opens in a new tab)