It is mentioned in the explanation of the Creed of at-Tahaawi,
There are some devils that the people call invisible men. Some people converse with them. They perform for the people some “miracles” that make the humans believe that they are close friends of Allah. Some of them aid the polytheist against the Muslims. Some say that the Messenger order them to kill the Muslims along with the polytheists because the Muslims were sinful.
The commentator of the Creed noted,
In reality they are the brother of the polytheist. The people of knowledge are in three groups with respect to invisible men. (1) One group denies the existence of such invisible men. But the people have witnessed them. And it is confirmed that some trustworthy people have witnessed them and have related what they saw. (2) A group that admits their existence and accepts it as a will of Allah. They believe, therefore, that there is a hidden path to Allah other than the path of the Prophets. (3) A group that rules out the existence of patrons of Allah outside of the framework of the Messenger but they believe both groups have received help from Allah. These people give glorification to the Messenger, being ignorant of his religion and laws.
Then he says, making clear what they and their followers are:
The truth of the matter is that they are all followers of the devils. The “invisible men” are nothing but jinn who are called men, as Allah says, “Indeed men of the humans used to invoke the protection of men of the jinn...” (al-Jinn 6). And the humans have company with them and witness and see them. Sometimes they cannot be seen but it is not the case that they keep themselves hidden from mankind. Those who think that they are humans are mistaken and ignorant.
Then he explains the reason for the differences of opinion about them and the reasons for their existence of three groups mentioned above,
The problem lies in not differentiating between the patrons of Satan and the patrons of Allah. It is obligatory to compare the actions of the people (or of the invisible men) and their statemens to the book of Allah and the sunnah of the Prophet (peace be upon him). What agrees with these two guides is correct and what disagrees with them is wrong. No matter what a person does and exposes of his deeds, he will not be a believer or devotee of Allah, even if he flies in the air or walks on water, as long as he does not stick to the Book and Sunnah.
[ Sharh al-Aqeeda al-Tahaawiya, pp. 571-572]
Sheikh ul Islam Ibn Taimiya said regarding distinguishing between situations of Allah and situations of Shaytan,
The one who cannot distinguish between Godly situations and Satanic situations will have truth resembling falsehood in his eyes. One whom Allah does not enlighten his heart and give him the reality of faith and following the Quran will not know the path of truth from falsehood. He will confuse the two situations in the same way people were confused by Musailama the liar of Yemen and other liars who claimed to be prophets.
[Jaami al-Rasaail, p. 197].