Hadithcore
Sunan Abi Dawud, 4857

Narrated Abdullah ibn Amr ibn al-'As:

There are some expressions which a man utters three times when he gets up from an assembly he will be forgiven for what happened in the assembly; and no one utters them in an assembly held for a noble cause or for remembrance of Allah but that is stamped with them just as a document is stamped with a signet-ring. These expressions are: Glory be to You, O Allah, and I begin with praise of You, there is no god but you; I ask Your pardon, and return to You in repentance.

حَدَّثَنَا أَحْمَدُ بْنُ صَالِحٍ، حَدَّثَنَا ابْنُ وَهْبٍ، قَالَ أَخْبَرَنِي عَمْرٌو، أَنَّ سَعِيدَ بْنَ أَبِي هِلاَلٍ، حَدَّثَهُ أَنَّ سَعِيدَ بْنَ أَبِي سَعِيدٍ الْمَقْبُرِيَّ حَدَّثَهُ عَنْ عَبْدِ اللَّهِ بْنِ عَمْرِو بْنِ الْعَاصِ، أَنَّهُ قَالَ كَلِمَاتٌ لاَ يَتَكَلَّمُ بِهِنَّ أَحَدٌ فِي مَجْلِسِهِ عِنْدَ قِيَامِهِ ثَلاَثَ مَرَّاتٍ إِلاَّ كُفِّرَ بِهِنَّ عَنْهُ وَلاَ يَقُولُهُنَّ فِي مَجْلِسِ خَيْرٍ وَمَجْلِسِ ذِكْرٍ إِلاَّ خُتِمَ لَهُ بِهِنَّ عَلَيْهِ كَمَا يُخْتَمُ بِالْخَاتَمِ عَلَى الصَّحِيفَةِ سُبْحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ لاَ إِلَهَ إِلاَّ أَنْتَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ ‏.‏

References2 variants
In-Book Reference
Book 43, Hadith 85
English Reference
Book 42, Hadith 4839