Thus Adam disobeyed his Lord, so he went astray. Then his Lord chose him, and turned to him with forgiveness, and gave him guidance.
Al-Bukhari recorded that Abu Hurayrah said that the Prophet said,
حَاجَّ مُوسَى ادَمَ فَقَالَ لَهُ أَنْتَ الَّذِي أَخْرَجْتَ النَّاسَ مِنَ الْجَنَّةِ بِذَنْبِكَ وَأَشْقَيْتَهُمْ قَالَ ادَمُ يَا مُوسَى أَنْتَ الَّذِي اصْطَفَاكَ اللهُ بِرِسَالَااتِهِ وَبِكَلَامِهِ أَتَلُومُنِي عَلَى أَمْرٍ كَتَبَهُ اللهُ عَلَيَّ قَبْلَ أَنْ يَخْلُقَنِي أَوْ قَدَّرَهُ اللهُ عَلَيَّ قَبْلَ أَنْ يَخْلُقَنِي قال رسول اللهصلى الله عليه وسلّم فَحَجَّ ادَمُ مُوسَى
Musa argued with Adam and he said to him, "Are you the one who got mankind expelled from Paradise because of your sin and you caused them grief!"
Adam replied, "Are you the one whom Allah chose for His Divine Messages and His direct Speech! Are you blaming me for a matter that Allah wrote upon me before He created me!"
Then, the Messenger of Allah said, (Thus, Adam defeated Musa.
This Hadith has various routes of transmission in the Two Sahihs as well as the Musnad collections