الآية رقم (102) - وَاتَّبَعُواْ مَا تَتْلُواْ الشَّيَاطِينُ عَلَى مُلْكِ سُلَيْمَانَ وَمَا كَفَرَ سُلَيْمَانُ وَلَـكِنَّ الشَّيْاطِينَ كَفَرُواْ يُعَلِّمُونَ النَّاسَ السِّحْرَ وَمَا أُنزِلَ عَلَى الْمَلَكَيْنِ بِبَابِلَ هَارُوتَ وَمَارُوتَ وَمَا يُعَلِّمَانِ مِنْ أَحَدٍ حَتَّى يَقُولاَ إِنَّمَا نَحْنُ فِتْنَةٌ فَلاَ تَكْفُرْ فَيَتَعَلَّمُونَ مِنْهُمَا مَا يُفَرِّقُونَ بِهِ بَيْنَ الْمَرْءِ وَزَوْجِهِ وَمَا هُم بِضَآرِّينَ بِهِ مِنْ أَحَدٍ إِلاَّ بِإِذْنِ اللّهِ وَيَتَعَلَّمُونَ مَا يَضُرُّهُمْ وَلاَ يَنفَعُهُمْ وَلَقَدْ عَلِمُواْ لَمَنِ اشْتَرَاهُ مَا لَهُ فِي الآخِرَةِ مِنْ خَلاَقٍ وَلَبِئْسَ مَا شَرَوْاْ بِهِ أَنفُسَهُمْ لَوْ كَانُواْ يَعْلَمُونَ

(102) - “And they followed [instead] what the devils had recited during the reign of Sulaiman. It was not Sulaiman who disbelieved, but the devils disbelieved, teaching people magic and that which was revealed to the two angels at Babylon, Harut and Marut. But the two angels did not teach anyone except after they had said, ‘We are a trial, so do not disbelieve [by practicing magic].’ And [yet] they learn from them that by which they cause separation between a man and his wife. But they could not harm anyone through it except by permission of Allah. And the people learn what harms them and does not benefit them. But the Children of Israel certainly knew that whoever purchased the magic would not have any share in the Hereafter. And wretched is that for which they sold themselves, if they only knew.”

Whereas Sayyidina Sulaiman u is the son of the Prophet Dawud . He had asked from His God to grant him a kingdom which will not belong to anyone after him. Thus, Allah  had subjected to him the winds, birds and  jinns and had softened iron for him:

﴿قَالَ رَبِّ اغْفِرْ لِي وَهَبْ لِي مُلْكاً لا يَنْبَغِي لأَحَدٍ مِنْ بَعْدِي إِنَّكَ أَنْتَ الْوَهَّابُ (٣٥) فَسَخَّرْنَا لَهُ الرِّيحَ تَجْرِي بِأَمْرِهِ رُخَاءً حَيْثُ أَصَابَ (٣٦) وَالشَّيَاطِينَ كُلَّ بَنَّاءٍ وَغَوَّاصٍ (٣٧) وَآخَرِينَ مُقَرَّنِينَ فِي الأَصْفَادِ (٣٨)﴾

“He said, ‘My Lord, forgive me and grant me a kingdom such as will not belong to anyone after me. Indeed, You are the Bestower.’ So We subjected to him the wind blowing by his command, gently, wherever he directed,  And [also] the devils [of jinn] – every builder and diver, And others bound together in shackles.” [Surah Sad: 35-38].