"Said the one who had knowledge from the Book": He was a man from the Children of Israel called Asif, who knew the Greatest Name of Allah, which, when He is called upon by it, He answers. "I will bring it to you before your glance returns to you." His glance refers to: one sending a messenger to the limit of his sight, and the messenger does not return until it [the throne] is brought to him. So the man called upon [Allah] by the Greatest Name of Allah. "And when he saw it"—Solomon saw the throne—"placed before him, he said, 'This is from the favor of my Lord to test me whether I will be grateful or ungrateful,'" meaning: shall I be grateful for the blessing or ungrateful for it? "And whoever is grateful, he is only grateful for [the benefit of] his own soul."
Yahya, from al-Mu'alla, from al-A'mash, from al-Minhal ibn 'Amr, from Sa'id ibn Jubayr, from Ibn 'Abbas, who said: "The companion of Solomon who said, 'I will bring it to you,' knew the Greatest Name, so he called upon [Allah] with it. Between him and it was a journey of two months, and it was a farsakh away from him. When the throne came to him, it was as if Solomon felt something like envy toward him, then he reflected and said, 'Is not this one who was able to do what I could not do, subservient to me?! This is from the favor of my Lord to test me whether I will be grateful or ungrateful.'"
Surah al-Naml (from verse 41 to verse 44).