The Prophet ﷺ said, "While I was near the House, in a state between sleep and wakefulness..." He then mentioned the hadith of the Ascension, in which he said:"We came to the third heaven.It was asked, 'Who is this?'It was said, 'Jibreel.'It was asked, 'Who is with you?'It was said, 'Muhammad.'It was asked, 'Has he been sent for?'He replied, 'Yes.'It was said, 'Welcome to him, and what an excellent arrival.'I came upon Yusuf and greeted him, and he said, 'Welcome, brother and prophet.'"
قال النبي ﷺ: بينا أنا عند البيت بين النائم واليقظان… فذكر حديث المعراج وفيه: فأتينا السماء الثالثة قيل: من هذا؟ قيل: جبريل قيل: من معك؟ قيل: محمد قيل: وقد أرسل إليه؟ قال: نعم قيل: مرحبا به ولنعم المجيء جاء فأتيت على يوسف فسلمت عليه. قال: مرحبا بك من أخ ونبي.
Bukhari narrated 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," and he related it.