The bible teaches us not to interact with the dead spirits, if it was king Solomon it was not of God, it was of Satan.
........
According to 1 Kings 11: Solomon's "wives turned his heart after other gods", their own national deities, to whom Solomon built temples, thus incurring divine anger and retribution in the form of the division of the kingdom after Solomon's death. (1 Kings 11:9–13)
1 Kings 11 describes Solomon's descent into idolatry, particularly his turning after Ashtoreth, the goddess of the Sidonians, and after Milcom, the abomination of the Ammonites. In Deuteronomy 17:16–17, a king is commanded not to multiply horses or wives, neither greatly multiply to himself gold or silver. Solomon sins in all three of these areas. Solomon collects 666 talents of gold each year, (1 Kings 10:14) a huge amount of money for a small nation like Israel. Solomon gathers a large number of horses and chariots and even brings in horses from Egypt. Just as Deuteronomy 17 warns, collecting horses and chariots takes Israel back to Egypt. Finally, Solomon marries foreign women, and these women turn Solomon to other gods.
According to 1 Kings 11:30-34, it was because of these sins that "the Lord punishes Solomon by removing 10 of the 12 Tribes of Israel from the Israelites.[17]
And the Lord was angry with Solomon, because his heart had turned away from the Lord, the God of Israel, who had appeared to him twice and had commanded him concerning this thing, that he should not go after other gods. But he did not keep what the Lord commanded. Therefore the Lord said to Solomon, "Since this has been your practice and you have not kept my covenant and my statutes that I have commanded you, I will surely tear the kingdom from you and will give it to your servant. Yet for the sake of David your father I will not do it in your days, but I will tear it out of the hand of your son. However, I will not tear away all the kingdom, but I will give one tribe to your son, for the sake of David my servant and for the sake of Jerusalem that I have chosen.
Solomon - Wikipedia, the free encyclopedia