Hadithcore
Ash-Shama'il Al-Muhammadiyah, 415
sahih· Zubair `Aliza'i

Anas said:

"The Prophet (ﷺ) said (ﷺ): 'If someone sees me in his sleep, he has indeed seen me, for Satan cannot impersonate me!' He also said: 'The vision of the believer is one of forty-six parts of Prophethood.'"

حَدَّثَنَا عَبْدُ اللهِ بْنُ عَبْدِ الرَّحْمَنِ الدَّارِمِيُّ، قَالَ‏:‏ حَدَّثَنَا مُعَلَّى بْنُ أَسَدٍ، قَالَ‏:‏ حَدَّثَنَا عَبْدُ الْعَزِيزِ بْنُ الْمُخْتَارِ، قَالَ‏:‏ حَدَّثَنَا ثَابِتٌ، عَنْ أَنَسٍ‏:‏ أَنَّ رَسُولَ اللهِ صلى الله عليه وسلم، قَالَ‏:‏ مَنْ رَآنِي فِي الْمَنَامِ فَقَدْ رَآنِي، فَإِنَّ الشَّيْطَانَ لا يَتَخَيَّلُ بِي وَقَالَ‏:‏ وَرُؤْيَا الْمُؤْمِنِ جُزْءٌ مِنْ سِتَّةٍ وَأَرْبَعِينَ جُزْءًا مِنَ النُّبُوَّةِ‏.‏

References1 variant
In-Book Reference
Book 56, Hadith 9