Abdullah bin Amr bin As reported,

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."

Ibn Majah 1408

Sahih

حدثنا عبيد الله بن الجهم الأنماطي حدثنا أيوب بن سويد عن أبي زرعة السيباني يحيى بن أبي عمرو حدثنا عبد الله بن الديلمي

عن عبد الله بن عمرو

عن النبي ﷺ قال لما فرغ سليمان بن داود من بناء بيت المقدس سأل الله ثلاثا حكما يصادف حكمه وملكا لا ينبغي لأحد من بعده وألا يأتي هذا المسجد أحد لا يريد إلا الصلاة فيه إلا خرج من ذنوبه كيوم ولدته أمه فقال النبي ﷺ أما اثنتان فقد أعطيهما وأرجو أن يكون قد أعطي الثالثة

ابن ماجه 1408صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Establishing prayer and the sunnah regarding it
Chapter
Prayer in the masjid of Bayt al-Maqdis
Numbering
Darussalam 1408
Ibn Majah 1408