Negative commandment · Lo Ta’aseh #28 of 613
Not to listen to someone who prophesies in the name of false gods
שלא לשמוע למתנבא בשם עבודה זרה
The verse · Devarim 13:4
לֹא תִשְׁמַע אֶל־דִּבְרֵי הַנָּבִיא הַהוּא אוֹ אֶל־חוֹלֵם הַחֲלוֹם הַהוּא כִּי מְנַסֶּה ה׳ אֱלֹהֵיכֶם אֶתְכֶם לָדַעַת הֲיִשְׁכֶם אֹהֲבִים אֶת־ה׳ אֱלֹהֵיכֶם בְּכׇל־לְבַבְכֶם וּבְכׇל־נַפְשְׁכֶם
“thou shalt not hearken to the words of that prophet, or that dreamer of dreams: for the Lord your God puts you to the proof, to know whether you love the Lord your God with all your heart and with all your soul.”
The Rambam’s words
Not to listen to someone who prophesies in the name of false gods, as [Deuteronomy 13:4] states: "Do not listen to the words of that prophet."
שלא לשמוע למתנבא בשם עבודה זרה, שנאמר "לא תשמע, אל דברי הנביא" (דברים יג,ד).
Why · Sefer HaChinuch #456
To not listen to one who prophecies in the name of idolatry
“It is from the roots of the commandment [that it is] because error is constantly found with people and their intellects are not strong [enough] to come to the complete truth about things.”
Who & when
“And it is practiced in every place and at all times by males and females.”
Where in the Mishneh Torah
Hilchot Foreign Worship and Customs of the Nations הלכות עבודה זרה וחוקות הגויים