Safiyya reported from some of the wives of Allah's Apostle (ﷺ) Allah's Apostle (ﷺ) having said: He who visits a diviner ('Arraf) and asks him about anything, his prayers extending to forty nights will not be accepted.
Hadith ReferenceSahih Muslim / The Book of Greetings / Hadith: 2230