The Prophet ﷺ said, "While I was beside the House, between sleep and wakefulness..." He then recounted the hadith of the Ascension, in which he said:"We came to the second heaven.It was asked, 'Who is this?'The reply came, 'Jibreel.'It was asked, 'Who is with you?'He answered, 'Muhammad ﷺ.'It was asked, 'Has he been sent for?'He said, 'Yes.'It was said, 'Welcome to him. What an excellent arrival!'I then came upon Isa and Yahya, who said, 'Welcome to you as a brother and a prophet.'"The hadith continues.
قال النبي ﷺ: بينا أنا عند البيت بين النائم واليقظان… فذكر حديث المعراج وفيه: فأتينا السماء الثانية قيل: من هذا؟ قيل: جبريل قيل: من معك؟ قيل: محمد ﷺ قيل: أرسل إليه؟ قال: نعم قيل: مرحبا به ولنعم المجيء جاء، فأتيت على عيسى ويحيى فقالا: مرحبا بك من أخ ونبي… الحديث.
Bukhari reported it in the Book of the Beginning of Creation (3207), and Muslim in the Book of Faith (164:264), both from the hadith of Qatada, who said, Anas bin Malik narrated to us, from Malik bin Sasaa, who said, and he mentioned it.