سُبْحَانَ الَّذِي أَسْرَى بِعَبْدِهِ لَيْلاً مِنَ الْمَسْجِدِ الْحَرَامِ إِلَى الْمَسْجِدِ الأَقْصَى الَّذِي بَارَكْنَا حَوْلَهُ لِنُرِيَهُ مِنْ آيَاتِنَا إِنَّهُ هُوَ السَّمِيعُ الْبَصِيرُ (الإسراء: 1).
Glorious is He Who made his servant travel by night from Al-Masjid-ul-Haram to Al-Masjid-ul-AqSa whose environs We have blessed, so that We let him see some of Our signs. Surely, He is the All-Hearing, the All- Seeing.[17:1]
وَإِذْ قُلْنَا لَكَ إِنَّ رَبَّكَ أَحَاطَ بِالنَّاسِ وَمَا جَعَلْنَا الرُّؤْيَا الَّتِي أَرَيْنَاكَ إِلاَّ فِتْنَةً لِلنَّاسِ وَالشَّجَرَةَ الْمَلْعُونَةَ فِي الْقُرْآنِ وَنُخَوِّفُهُمْ فَمَا يَزِيدُهُمْ إِلاَّ طُغْيَانًا كَبِيرًا
(Remember) when We said to you that your Lord encompasses all humans. And We did not make the vision We showed to you, but a test for the people — and the tree cursed in the Qur‗an as well. And We warn them, yet it adds nothing to them but enormous rebellion.
Hadith from Bukhari.
Narrated Ibn Abbas:
Regarding: 'And We granted the vision (Ascension to the Heaven "Miraj") which We showed you (O Muhammad as an actual eye witness) but as a trial for mankind.' (17.60) It was an actual eye-witness which was shown to Allah's Apostle during the night he was taken on a journey (through the heavens). And the cursed tree is the tree of Az-Zaqqum (a bitter pungent tree which grows at the bottom of Hell).