The Prophet ﷺ said, "While I was at the House, in a state between sleep and wakefulness..." and the hadith continues, in which he said, "Then we came to the seventh 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?' It was said, 'Yes.' It was said, 'Welcome to him, and what an excellent arrival.' Then I came upon Ibrahim and greeted him, and he said, 'Welcome, righteous son and righteous Prophet.' Then the Frequented House was raised up for me..." and the hadith continues.
قال النبي ﷺ: بينا أنا عند البيت بين النائم واليقظان… الحديث وفيه: فأتينا السماء السابعة قيل: من هذا؟ قيل: جبريل. قيل: من معك؟ قيل: محمد. قيل: وقد أرسل إليه مرحبا به ولنعم المجيء جاء فأتيت على إبراهيم فسلمت عليه فقال مرحبا بك من ابن ونبي، فرفع لي البيت المعمور… الحديث.
Bukhari narrated it in the Beginning of Creation (3207), and Muslim in Faith (164:264), both through Qatada, who said, Anas bin Malik narrated to us, from Malik bin Sasaa, and he related it.