Mishkat al-Masabih 661
وَعَنْ سَعْدِ بْنِ أَبِي وَقَّاصٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ أَنَّهُ قَالَ: «مَنْ قَالَ حِينَ يَسْمَعُ الْمُؤَذِّنَ أَشْهَدُ أَنْ لَا إِلَهَ إِلَّا اللَّهُ وَحْدَهُ لَا شَرِيكَ لَهُ وَأَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ رَضِيتُ بِاللَّهِ رَبًّا وَبِمُحَمَّدٍ رَسُولًا وَبِالْإِسْلَامِ دِينًا غُفِرَ لَهُ ذَنبه» . رَوَاهُ مُسلم
And from Saʿd ibn Abi Waqqas, who said: The Messenger of Allah ﷺ said: "Whoever says when he hears the muʾadhdhin: 'I bear witness that there is no god but Allah alone, without partner, and that Muhammad is His servant and His Messenger; I am pleased with Allah as Lord, with Muhammad as Messenger, and with Islam as religion,' his sin is forgiven." Reported by Muslim.