Negative commandment · Lo Ta’aseh #37 of 613
Not to consult a yid'oni
שלא לשאול ביידעוני
The verse · Devarim 18:11
וְחֹבֵר חָבֶר וְשֹׁאֵל אוֹב וְיִדְּעֹנִי וְדֹרֵשׁ אֶל־הַמֵּתִים
“or a charmer, or a medium, or a wizard, or a necromancer.”
The Rambam’s words
Not to consult a yid'oni, as [Deuteronomy, ibid.] states: "[There shall not be found among you...] one who consults an ov or a yid'oni."
שלא לשאול ביידעוני, שנאמר "ושואל אוב ויידעוני" (דברים יח,יא).
Where in the Mishneh Torah
Hilchot Foreign Worship and Customs of the Nations הלכות עבודה זרה וחוקות הגויים