Abd al-Rahman bin Abi Layla (may Allah have mercy on him) narrates from his teachers (the noble Companions, may Allah be pleased with them) that they said: "The Messenger of Allah (peace and blessings be upon him) was on a journey. When the sun had set, he (peace and blessings be upon him) heard a man giving the adhan. He said: 'Allahu akbar, Allahu akbar' (Allah is the Greatest, Allah is the Greatest), and the Messenger of Allah (peace and blessings be upon him) repeated the same words he had said. Then he said: 'Ashhadu an la ilaha illallah' (I bear witness that there is no true god except Allah), and the Messenger of Allah (peace and blessings be upon him) said: 'He has borne true witness.' Then he said: 'Ashhadu anna Muhammadan rasulullah' (I bear witness that Muhammad (peace and blessings be upon him) is the Messenger of Allah), and the Messenger of Allah (peace and blessings be upon him) said: 'He has made Paradise obligatory (for himself).' Then the Messenger of Allah (peace and blessings be upon him) said: 'Look for this man; you will find him either a shepherd grazing goats far from the settlement, or one who keeps hunting dogs.' The narrator said: They looked for him and found him to be a shepherd grazing goats far from the settlement."
Ahmad bin Mani' also narrated it through Abu Mu'awiyah.
All the narrators of this chain are thiqat (trustworthy).
And Imam Ahmad bin Hanbal (may Allah have mercy on him) narrated it through Abd al-Rahman bin Abi Layla from Sayyiduna Mu'adh (may Allah be pleased with him).