Assalamualaikum ustaz. There are people who claimed that he knows unseen matters. Is it true that there are special people who know unseen matters?
Waalaikumussalam wrt. wbt.,
Alhamdulillah, praise and gratitude to Allah SWT for His countless blessings for us all. Praise and salutations to our beloved Prophet Muhammad PBUH, his family, companions, and all those who follow his footsteps until the Final day.
Allah SWT states:
وَعِنْدَهُ مَفَاتِحُ الْغَيْبِ لَا يَعْلَمُهَا إِلَّا هُوَ
“And with Him are the keys of the unseen; none knows them except Him.” 
Ibn Kathir in his commentary presented a hadith narrated by Imam al-Bukhari from Ibn ‘Umar R.Anhuma, Rasullullah PBUH said:
مَفَاتِيحُ الغَيْبِ خَمْسٌ لاَ يَعْلَمُهَا إِلَّا اللَّهُ: لاَ يَعْلَمُ مَا فِي غَدٍ إِلَّا اللَّهُ. وَلاَ يَعْلَمُ مَا تَغِيضُ الأَرْحَامُ إِلَّا اللَّهُ. وَلاَ يَعْلَمُ مَتَى يَأْتِي المـَطَرُ أَحَدٌ إِلَّا اللَّهُ. وَلاَ تَدْرِي نَفْسٌ بِأَيِّ أَرْضٍ تَمُوتُ. وَلاَ يَعْلَمُ مَتَى تَقُومُ السَّاعَةُ إِلَّا اللَّهُ
“The keys of the unseen are five and none knows them but Allah: (1) None knows (the sex) what is in the womb, but Allah: (2) None knows what will happen tomorrow, but Allah; (3) None knows when it will rain, but Allah; (4) None knows where he will die, but Allah (knows that); (5) and none knows when the Hour will be established, but Allah.” 
Only Allah knows About the Unseen Matters
Unseen matters are divided into two which are what is informed by Rasullullah PBUH and matters that aren’t informed by the Prophet PBUH. If the matters are included in the informed matters, there is space for its depiction, however, it is limited and it can never be truly detailed. However, if it is not, then it is included in unseen matters that are only known by Allah SWT.
Dr Yusuf al-Qaradhawi stated in al-Halal wa al-Haram regarding the prevention of confusion and superstition. Among others, he said: When Rasullullah PBUH was sent, he found that there are from among the Arabs several races of the dajjal (antichrist) that is known as the kahin, who are sorcerers, shamans or fortune-tellers who claimed that they know of unseen matters, whether it is matters that has come to pass or will happen through the mediator of the jinn, medium and others.
Thus, Rasullullah PBUH declared war on this deviant belief that isn’t supported by any true knowledge or guidance and true shariah. The Prophet PBUH conveyed the revelation of Allah SWT on this matter, reciting to them the verse:
قُلْ لاَّ يَعْلَمُ مَنْ فِى السَّمَٰوَٰتِ وَالأَرْضِ الْغَيْبَ إِلاَّ اللهُ
“Say, “None in the heavens and earth knows the unseen except Allah,” 
Ibn Kathir in his commentary said: Allah SWT commanded His Messenger to utter something and teach the whole mankind that none of the residents of the heavens and earth knows of an unseen matter except Allah. “إِلاَّ اللهُ” “except Allah” is the istithna’ munqathi’, which means none knows of the matter except Allah SWT and He is the only one who knows and there is none associated with Him. This is as stated in Allah SWT stated: “وَعِنْدَهُ مَفَاتِحُ الْغَيْبِ لَا يَعْلَمُهَا إِلَّا هُوَ” The keys of the unseen are five and none knows them but Allah; none knows but Allah.” There are various verses in this issue.
To reaffirm, none knows of the unseen matters, whether it is the angels, jinn or humans. Then the Prophet PBUH explained the commandment of Allah SWT in His statement:
وَلَوْ كُنْتُ أَعْلَمُ الْغَيْبَ لاسْتَكْثَرْتُ مِنَ الْخَيْرِ وَمَا مَسَّنِيَ السُّوءُ إِنْ أَنَا إِلا نَذِيرٌ وَبَشِيرٌ لِقَوْمٍ يُؤْمِنُونَ
“And if I knew the unseen, I could have acquired much wealth, and no harm would have touched me. I am not except a warner and a bringer of good tidings to a people who believe.” 
Allah SWT explained regarding the jinn during the rime of the Prophet Solomon AS:
أَنْ لَوْ كَانُوا يَعْلَمُونَ الْغَيْبَ مَا لَبِثُوا فِي الْعَذَابِ الْمُهِينِ
“If they had known the unseen, they would not have remained in humiliating punishment.” 
To conclude, we state that there is none who knows unseen matters except Allah SWT. Whoever claims that he knows the truth of unseen matters, surely, he is lying towards Allah SWT and the truth of the matter to the people.
Lastly, may Allah SWT grant us all understanding in this religion and distance us from matters that can deviate us from our faith and belief. We end with the supplication:
اللَّهُمَّ أَرِنَا الْحَقّ حَقًّا وَارْزُقْنَا اِتِّبَاعه وَأَرِنَا الْبَاطِل بَاطِلًا وَارْزُقْنَا اجْتِنَابه وَلَا تَجْعَلهُ مُتَلَبِّسًا عَلَيْنَا فَنَضِلَّ وَاجْعَلْنَا لِلْمُتَّقِينَ إِمَامًا
“O Allah! show us the truth as true, and inspire us to follow it. Show us falsehood as falsehood, and inspire us to abstain from it and don’t make us from among the confused that it led us astray from the truth and make our leaders from amongst the people of taqwa.”
 Surah al-An’am: 59
 See Tafsir Ibn Kathir, 3/264
 Narrated by al-Bukhari (4697)
 Surah al-Naml: 65
 See Tafsir Ibn Kathir, 6/207
 Surah al-A’raf: 188
 Surah Saba’: 14