The confrontation with Ahab
According to 1 Kings 22 and 2 Chronicles 18, Jehoshaphat, king of Judah, joined Ahab, king of Israel, who proposed a joint campaign to recover Ramoth-gilead from Aramean control. Ahab's four hundred prophets unanimously endorsed the expedition, but Jehoshaphat asked whether there was a further prophet of the Lord to be consulted. Ahab reluctantly named Micaiah, son of Imlah, saying that he disliked him because his prophecies had never been favorable to the king.
When first brought before the kings, Micaiah echoed the assurance of the court prophets, but Ahab pressed him to speak the truth in the name of the Lord. Micaiah then delivered his genuine prophecy, describing a vision of the heavenly council in which the Lord sought one who would entice Ahab to go up to the battle in which he would fall. A spirit came forward and offered to become a lying spirit in the mouth of the prophets, accounting for the unanimous and false counsel Ahab had received.