A man reported,

He sat in a gathering, and when those present were about to rise, he said, "Glory be to You, O 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."A man from the group asked, "What is this saying, Messenger of Allah ﷺ?"He ﷺ replied, "These are words that Jibreel عليه السلام taught me. They are an expiation for whatever wrongs may have occurred in the gathering."

Azami 10791

Sahih

عن رجل من أصحاب رسول الله ﷺ

أنه جلس مجلسا فلما أرادوا أن يقوم قال: سبحانك اللهم وبحمدك، أشهد أن لا إله إلا أنت، أستغفرك وأتوب إليك. قال: فقال رجل من القوم: ما هذا الحديث يا رسول الله ﷺ؟ قال ﷺ: كلمات علمنيهن جبريل عليه السلام كفارات الخطايا المجلس.

الأعظمي 10791صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Supplications, remembrances, and prayer upon the chosen Prophet ﷺ
Chapter
Supplications
Section
What to say when getting up from one's gathering
Numbering
Jami al-Kamil 10791 (2nd edition)
Azami 10791