I cannot say with certainty how he has that knowledge. One possibility is that Allah inspires him to know that, but another possibility is that such positions are gained through connection with jinn. I do not want to judge him in any way, but the second possibility is more common.