2 Kings 1:16
Elijah told Ahaziah, "This is what the Lord says: 'You have sent messengers to ask questions of Baal-Zebub, god of Ekron. Is it because you think there is no God in Israel to ask? Because of this, you will never get up from your bed; you will die.'"
Asking questions of a false god instead of Israel's God is condemned.
2 Kings 16:15baqar
King Ahaz commanded Uriah the priest, "On the large altar burn the morning burnt offering, the evening grain offering, the king's burnt offering and grain offering, and the whole burnt offering, the grain offering, and the drink offering for all the people of the land. Sprinkle on the altar all the blood of the burnt offering and of the sacrifice. But I will use the bronze altar to ask questions of God."