It is narrated from Sayyiduna Ali (may Allah be pleased with him) that when the Prophet (peace and blessings be upon him) entered the mosque, he would supplicate: "'Allahumma iftah li abwaba rahmatik' (O Allah, open for me the gates of Your mercy)." And when he came out of the mosque, he would say: "'Allahumma iftah li abwaba fadlik' (O Allah, open for me the gates of Your bounty and grace)."
In the chain of this narration, Layth bin Abi Sulaym and other narrators contradicted Salih bin Musa; according to them, Abdullah bin al-Hasan narrated it from his mother Fatimah bint al-Husayn, and she from her grandmother Sayyidah Fatimah, the daughter of the Messenger of Allah (peace and blessings be upon him).
Hadith Referenceالمطالب العالية بزوائد المسانيد الثمانية / كتاب الصلاة / 378
Hadith Gradingمحدثین:إسناده منقطع، موقوف
Hadith Takhrij«حکم الحدیث المطالب العالیہ محققاً تنسیق د. سعد بن ناصر بن عبد العزيز الشَّثري- مکتبہ شاملہ :موقوف، إسناده منقطع. » «أخرجه مجمع الزوائد ومنبع الفوائد برقم: 2096»