Hadith 703

وَعَنْ أَبِي أُسَيْدٍ قَالَ: قَالَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ: إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيَقُلِ: اللَّهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ. وَإِذَا خَرَجَ فَلْيَقُلِ: الله إِنِّي أَسأَلك من فضلك . رَوَاهُ مُسلم
Abu Usaid reported God's Messenger as saying:When any of you enters the mosque he should say, “O God, open to me the gates of Thy mercy, “and when he goes out he should say “O God, I ask Thee out of Thine abundance.” Muslim transmitted it.
Hadith Reference Mishkat al-Masabih / The Book of Prayer / Hadith: 703
Hadith Grading الألبانی: صَحِيح  |  زبیر علی زئی: صحيح
Hadith Takhrij ´تحقيق و تخريج: محدث العصر حافظ زبير على زئي رحمه الله` «رواه مسلم (68/ 713)»