Solomon inquired as to why the boy was growing thinner, and when he heard of the demon’s tasks, he began to pray to God that He would hand him authority over the demon. His prayers were answered, as God sent the archangel Michael to deliver a ring to Solomon with the seal of God so that he would be able to imprison demons and force them to help construct the Temple.
So Solomon gave the ring to the boy and instructed him to throw the ring into the demon’s chest commanding him to go to Solomon when the demon appeared that day. The boy did as he was told and Solomon interrogated him.
“‘Tell me, in which sign of the zodiac do you reside?’ The demon replied, ‘In Aquarius; I strangle those who reside in Aquarius because of their passion for women whose zodiacal sign is Virgo. Moreover, while in a trance I undergo three transformations. Sometimes I am a man who craves the bodies of effeminate boys and when I touch them, they suffer great pain. Sometimes I become a creature with wings (flying) up to the heavenly regions. Finally, I assume the appearance of a lion. In addition, I am descended from an archangel of the power of God, but I am thwarted by Ouriel, the archangel.'” – TSol 2:2-4
Solomon then sealed the demon with his ring and ordered him to cut stone for the Temple. The demon then admitted to being afraid to touch iron. Solomon prayed to the archangel Ouriel to help him & the angel then commanded Ornias to cut the stones.
Solomon then commanded Ornias to bring him Beelzeboul, the Prince of Demons. Ornias was able to throw the ring at Beelzeboul, who winced in pain, and then returned with Ornias to Solomon.