They asked, "Messenger of Allah, when was prophethood decreed for you?"He replied, "While Adam was still between the spirit and the body."
حدثنا أبو همام الوليد بن شجاع بن الوليد البغدادي حدثنا الوليد بن مسلم عن الأوزاعي عن يحيى بن أبي كثير عن أبي سلمة
قالوا يا رسول الله متى وجبت لك النبوة قال وآدم بين الروح والجسد
[Sahih]. Bayhaqi also narrated it in Dalail Nubuwwah: 2/130, from the hadith of Walid bin Muslim with the same wording, and he explicitly stated that he heard it directly. Hakim also narrated it: 2/609. The hadith has many corroborating narrations.There is also a report on this topic from Maysara al-Fajr [Ahmad: 5/59, and Hakim: 2/608, 609].