Sahih Muslim 416
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِنَّمَا الإِمَامُ جُنَّةٌ فَإِذَا صَلَّى قَاعِدًا فَصَلُّوا قُعُودًا وَإِذَا قَالَ سَمِعَ اللَّهُ لِمَنْ حَمِدَهُ . فَقُولُوا اللَّهُمَّ رَبَّنَا لَكَ الْحَمْدُ . فَإِذَا وَافَقَ قَوْلُ أَهْلِ الأَرْضِ قَوْلَ أَهْلِ السَّمَاءِ غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ "
Abu Huraira reported:
The Messenger of Allah (ﷺ) said: Verily the Imam is a shield, say prayer sitting when he says prayer sitting. And when he says:" Allah listens to him who praises Him," say:" O Allah, our Lord, to You be the praise." and when the utterance of the people of the earth synchronises with that of the beings of heaven (angels), all the previous sins would be pardoned.
Full reference and source
Sahih Muslim 416 In-book : Book 4, Hadith 96 USC-MSA web (English) : Book 4, Hadith 830 (deprecated)
View source on Sunnah.com (opens in a new tab)