The Prophet ﷺ said that when Sulayman bin Dawud finished building Bayt al-Maqdis, he asked Allah for three things. He asked for judgment that aligned with His judgment, for a kingdom that would not be fitting for anyone after him, and that no one would come to this mosque seeking only to pray in it without leaving his sins behind as on the day his mother bore him.The Prophet ﷺ said, "As for two of them, he was granted them, and I hope he was granted the third as well."
حدثنا عبيد الله بن الجهم الأنماطي حدثنا أيوب بن سويد عن أبي زرعة السيباني يحيى بن أبي عمرو حدثنا عبد الله بن الديلمي
عن النبي ﷺ قال لما فرغ سليمان بن داود من بناء بيت المقدس سأل الله ثلاثا حكما يصادف حكمه وملكا لا ينبغي لأحد من بعده وألا يأتي هذا المسجد أحد لا يريد إلا الصلاة فيه إلا خرج من ذنوبه كيوم ولدته أمه فقال النبي ﷺ أما اثنتان فقد أعطيهما وأرجو أن يكون قد أعطي الثالثة
Sourcing, [sahih]. Narrated by Ibn Khuzayma in his Sahih, 2/288, no. 1334, from Ubaydullah bin Jahm, with this wording.Ayub was not alone in narrating it, Uzai followed him, as found in Hakim, 1/30–31, with this wording. Ahmad and Hakim (2/34), among others, narrated it from the hadith of Rabia bin Yazid, who said, Abdullah bin Firuz Daylami narrated to me, with this wording. Ibn Hibban graded it sahih (in Ihsan), no. 1633, as did Hakim and Dhahabi.The hadith has another sahih route in Nasai, 2/34, no. 694.