In the Quran, Solomon is described as being "tested" by having a body placed on his throne, until he repented:
Surah 38:34-38
34 And indeed, We tested Solomon, placing a body on his throne, then he turned ˹to Allah in repentance˺.
35 He prayed, "My Lord! Forgive me, and grant me an authority that will never be matched by anyone after me. You are indeed the Giver ˹of all bounties˺."
36 So We subjected to him the wind, blowing gently at his command to wherever he pleased.
37 And ˹We subjected to him˺ every builder and diver of the jinn,
38 And others bound together in chains.
Also note that he is described as having had "builder" Jinn subject to him, some of which were "bound together in chains".
In the Babylonian Talmud, which predates Muhammad, Solomon recruits Ashmedai, "king of the demons" (Gittin 68a:8), for help with building the Temple. Ashmedai locates the Shamir for him, which is a kind of legendary worm, able to cut through any substance (Gittin 68a:7-68b:13).
The story then says:
Babylonian Talmud - Gittin 68b
14 Solomon kept Ashmedai with him until he completed building the Temple. One day he stood with Ashmedai alone. He said to Ashmedai: It is written: "For him like the lofty horns of the wild ox" (Numbers 24:8), and the Sages say in explanation of the verse: "Like the lofty horns"; these are the ministering angels. "The wild ox"; these are the demons. In what way are you greater than us? Why does the verse praise your abilities and powers over those of human beings?
15 Ashmedai said to him: Take the chain engraved with God's name off me and give me your ring with God's name engraved on it, and I will show you my strength. Solomon took the chain off him and he gave him his ring. Ashmedai swallowed the ring and grew until he placed one wing in the heaven and one wing on the earth. He threw Solomon a distance of four hundred parasangs. With regard to that moment Solomon said: "What profit is there for a person through all of his toil under the sun?" (Ecclesiastes 1:3). With Solomon deposed from the throne, Ashmedai took his place.
Notice three elements of this story which parallel Surah 38 of the Quran:
Additionally, the story of Solomon in Surah 38 is in a section of the Quran that tells other stories of Biblical figures (Noah, Lot, David, Job, Abraham, Isaac, Jacob, etc.). Some of these stories contain details from the Bible. However, the account of Solomon's throne, and his use of demons in Surah 38:34-38 has no Biblical parallel. So, one has to look for its source, as it does not make sense that Muhammad would narrate a story that was unknown before his time. The source seems very clearly to be the Talmud, which contains fantastic tales of Solomon's interactions with demons.
Solomon is not given demonic helpers in the Biblical account, nor did he ever have a "body" placed on his throne, only to be restored later on. However, these things do happen in the Babylonian Talmud, which contains the non-inspired traditions of the Rabbis, which are often fantastic, and certainly never happened.