Abu Barza reported,

Toward the end of his life, whenever the Prophet ﷺ sat in a long gathering and then rose to leave, he would say, "Glory be to You, Allah, and praise be to You. I bear witness that there is no god but You. I seek Your forgiveness and turn to You in repentance."One of us said to him, "These are words we never used to hear from you before."The Messenger of Allah ﷺ replied, "This is an expiation for whatever may have occurred in the gathering."

Ahmad 19769

Sahih

حدثنا عبد الله بن نمير أنبأنا حجاج عن أبي هاشم الواسطي عن رفيع أبي العالية

عن أبي برزة الأسلمي قال

كان النبي ﷺ بآخرة إذا طال المجلس فقام قال سبحانك اللهم وبحمدك أشهد أن لا إله إلا أنت أستغفرك وأتوب إليك فقال له بعضنا إن هذا قول ما كنا نسمعه منك فيما خلا فقال رسول الله ﷺ هذا كفارة ما يكون في المجلس

أحمد 19769صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Barza Aslami
Numbering
Darussalam 19769
Ahmad 19769