Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:4317Abū ʿAbdullāh al-Ḥāfiẓ > ʿAbdullāh b. Muḥammad b. al-Nuʿmān al-Isfarāyīnī > Abū Muslim Ibrāhīm b. ʿAbdullāh > Musaddad > Bishr b. al-Mufaḍḍal > ʿUmārah b. Ghaziyyah > Rabīʿah b. Abū ʿAbd al-Raḥman > ʿAbd al-Malik b. Saʿīd b. Sūwayd al-Anṣārī > Abū Ḥumayd or Abū Usayd al-Sāʿidī

[Machine] The Messenger of Allah ﷺ said, "When one of you enters the mosque, he should greet (say salaam) and say, 'O Allah, open the doors of Your mercy for me.' And when he exits, he should say, 'O Allah, I ask You for Your favor (grace).'"

Narrated Abu 'Abdur-Rahman As-Sulami: Abu Mansur Muhammad bin Al-Qasim Al-'Ataki informed us, narrating from Al-Hasan bin 'Abdus-Samad Al-Quhundi, who narrated from Yahya bin Yahya, who informed us that Sulaiman bin Bilal narrated to us, and he mentioned it in a similar manner except that he did not mention the part about saying salaam.  

البيهقي:٤٣١٧أنبأ أَبُو عَبْدِ اللهِ الْحَافِظُ أَخْبَرَنِي عَبْدُ اللهِ بْنُ مُحَمَّدِ بْنِ النُّعْمَانِ الْإِسْفَرَايِينِيُّ ثنا أَبُو مُسْلِمٍ إِبْرَاهِيمُ بْنُ عَبْدِ اللهِ ثنا مُسَدَّدٌ ثنا بِشْرُ بْنُ الْمُفَضَّلِ عَنْ عُمَارَةَ بْنِ غَزِيَّةَ عَنْ رَبِيعَةَ بْنِ أَبِي عَبْدِ الرَّحْمَنِ قَالَ حَدَّثَنِي عَبْدُ الْمَلِكِ بْنُ سَعِيدِ بْنِ سُوَيْدٍ الْأَنْصَارِيُّ عَنْ أَبِي حُمَيْدٍ أَوْ أَبِي أُسَيْدٍ السَّاعِدِيِّ قَالَ

قَالَ رَسُولُ اللهِ ﷺ إِذَا دَخَلَ أَحَدُكُمُ الْمَسْجِدَ فَلْيُسَلِّمْ وَلْيَقُلِ اللهُمَّ افْتَحْ لِي أَبْوَابَ رَحْمَتِكَ وَإِذَا خَرَجَ فَلْيَقُلِ اللهُمَّ إِنِّي أَسْأَلُكَ مِنْ فَضْلِكَ 4318 وَثنا أَبُو عَبْدِ الرَّحْمَنِ السُّلَمِيُّ أنبأ أَبُو مَنْصُورٍ مُحَمَّدُ بْنُ الْقَاسِمِ يَعْنِي الْعَتَكِيَّ ثنا الْحَسَنُ بْنُ عَبْدِ الصَّمَدِ الْقُهُنْدَزِيُّ ثنا يَحْيَى بْنُ يَحْيَى أنبأ سُلَيْمَانُ بْنُ بِلَالٍ ثنا رَبِيعَةُ بْنُ أَبِي عَبْدِ الرَّحْمَنِ فَذَكَرَهُ بِنَحْوِهِ إِلَّا أَنَّهُ لَمْ يَقُلْ فَلْيُسَلِّمْ  

رَوَاهُ مُسْلِمٌ فِي الصَّحِيحِ عَنْ يَحْيَى بْنِ يَحْيَى وَعَنْ حَامِدِ بْنِ عُمَرَ عَنْ بِشْرِ بْنِ الْمُفَضَّلِ عَلَى لَفْظِ حَدِيثِ يَحْيَى بْنِ يَحْيَى وَلَفْظُ التَّسْلِيمِ فِيهِ مَحْفُوظٌ