Sahih Muslim 917
The Book of Prayers
حَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى، حَدَّثَنِي ابْنُ وَهْبٍ، أَخْبَرَنِي عَمْرٌو، أَنَّ أَبَا يُونُسَ، حَدَّثَهُ عَنْ أَبِي هُرَيْرَةَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " إِذَا قَالَ أَحَدُكُمْ فِي الصَّلاَةِ آمِينَ . وَالْمَلاَئِكَةُ فِي السَّمَاءِ آمِينَ . فَوَافَقَ إِحْدَاهُمَا الأُخْرَى غُفِرَ لَهُ مَا تَقَدَّمَ مِنْ ذَنْبِهِ " .
Abu Huraira reported:The Messenger of Allah (ﷺ) said: When anyone amongst you utters Amin in prayer and the angels in the sky also utter Amin, and this (utterance of the one) synchronises with (that of) the other, all his previous sins are pardoned
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.