Language:
كتاب القدر
82  
Divine Will (Al-Qadar)
(10)
Chapter: "... And We made not the vision which We showed you but a trial for the mankind..."
(10)
بَابُ: {وَمَا جَعَلْنَا الرُّؤْيَا الَّتِي أَرَيْنَاكَ إِلاَّ فِتْنَةً لِلنَّاسِ}
Sahih al-Bukhari 6613

Narrated Ibn `Abbas:

(regarding the Verse) "And We granted the vision (Ascension to the heavens "Miraj") which We showed you (O Muhammad as an actual eye witness) but as a trial for mankind.' (17.60): Allah's Apostle actually saw with his own eyes the vision (all the things which were shown to him) on the night of his Night Journey to Jerusalem (and then to the heavens). The cursed tree which is mentioned in the Qur'an is the tree of Az-Zaqqum.

حَدَّثَنَا الْحُمَيْدِيُّ، حَدَّثَنَا سُفْيَانُ، حَدَّثَنَا عَمْرٌو، عَنْ عِكْرِمَةَ، عَنِ ابْنِ عَبَّاسٍ ـ رضى الله عنهما ـ ‏{‏وَمَا جَعَلْنَا الرُّؤْيَا الَّتِي أَرَيْنَاكَ إِلاَّ فِتْنَةً لِلنَّاسِ‏}‏ قَالَ هِيَ رُؤْيَا عَيْنٍ أُرِيهَا رَسُولُ اللَّهِ صلى الله عليه وسلم لَيْلَةَ أُسْرِيَ بِهِ إِلَى بَيْتِ الْمَقْدِسِ‏.‏ قَالَ ‏{‏وَالشَّجَرَةَ الْمَلْعُونَةَ فِي الْقُرْآنِ‏}‏ قَالَ هِيَ شَجَرَةُ الزَّقُّومِ‏.‏
Reference : Sahih al-Bukhari 6613
In-book reference : Book 82, Hadith 19
USC-MSA web (English) reference : Vol. 8, Book 77, Hadith 610
  (deprecated numbering scheme)