Volume 1, Book 12, Number 762:
Narrated Abu Huraira:
Allah’s Apostle said, “When the Imam says, “Sami’ a-l-lahu Liman hamida,” you should say, “Al –
lahumma Rabbana laka-l-hamd.” And if the saying of any one of you coincides with that of the an –
gels, all his past sins will be forgiven.”