Allah denied this false claim and stated to His Prophet Muhammad that Gabriel and Michael were not sent with magic Then something black that appeared to be smoke would descend and enter his ears and the rest of his body, and this is Allah's anger
This is the devil's work

وَاتَّبَعُواْ مَا تَتْلُواْ الشَّيَاطِينُ عَلَى مُلْكِ سُلَيْمَانَ وَمَا كَفَرَ سُلَيْمَانُ وَلَـكِنَّ الشَّيْاطِينَ كَفَرُواْ

As for the Fitnah, it involves trials and freedom of choice.

15
(007
سورة البقرة
Nor did they the two angels teach it to anyone till they had said: We are only a temptation, therefore disbelieve not in the guidance of Allah
(007
They would convey this news to the soothsayers, and the soothsayers would in turn convey the news to the people
And from these angels people learn that by which they cause separation between man and his wife, This means, "The people learned magic from Harut and Marut and indulged in evil acts that included separating spouses, even though spouses are close to, and intimately associate with each other Said al-Suddi: モPeople in Solomons time wrote magic from each other and devoted themselves to learning it
And from these two angles people learn that by which they cause division between man and wife; but they injure thereby no-one save by Allah's leave What an evil tree you are, said Solomon

سورة البقرة

When this man would learn magic, the light of faith would depart him, and he would see it shining and flying away in the sky.

6
أخبار الخليج
Upon unearthing them, the devil said: It is by means of these that Solomon controlled the jinn, humans, devils and birds
أخبار الخليج
تفسير الإمام العسكري (ع)
'' The scholars who stated that learning magic is disbelief relied on this Ayah for evidence
They followed what the Shayatin devils gave out falsely of the magic in the lifetime of Suleiman Solomon it replied: I am for the purpose of destroying your sanctuary! '' And they prostrated except Iblis Satan , he refused , 20:116 , and so forth
The tree would say: This and that! Hence, Harut and Marut were two ordinary men not angels or Gabriel or Michael He said: It is under his throne; go and unearth it

(007

Allah, gloried and exalted is He, absolved Solomon of this deed and revealed this verseヤ.

26
إعراب القرآن للدعاس
Solomon neither disbelieved nor did Allah send magic with the two angels
أخبار الخليج
One of them would bring a word of truth from therein, and when he is trusted for telling the truth, he would add to it seventy lies with which he earns the hearts of people
تفسير الإمام العسكري (ع)
Sorcerers never bring harm to anyone except by Allah's leave