It was narrated from 'Abdullah bin 'Amr that the Messenger of Allah (ﷺ) said:
When Sulaiman bin Dawud finished building Bait Al-Maqdis, he asked Allah for three things: Judgement that was in harmony with His judgement, and he was given that. And he asked Allah for a dominion that no one after him would have, and he was given that. And when he finished building the Masjid he asked Allah, the Mighty and Sublime, that no one should come to it, intending only to pray there, but he would emerge free of sin as the day his mother bore him.