The prophet صلى الله عليه و سلم said:
“Adam and Musa عليهم السلام had an argument. Musa said, “you are Aadam, whom Allah created with His Hand, into whom He breathed the soul He created for you, to whom He made the Angels prostrate and whom He taught the names of everything. So why have you expelled us and yourself from Paradise?” Aadam replied, “you are Musa, whom Allah favored with His Message and His Speech. Have you not found that this had been written upon me before I was ever created?” Musa replied, “yes” Then the Messenger Of Allah صلى الله عليه و سلم said: “thus Aadam got the better of Musa in the argument.”
Reported by: Bukhaari, Muslim, Maalik, Aboo Dawud and At Tirmidhi on the authority of Abi Hurayrah.
Shaykh Ul Islaam Ibn Taymiyyah comments:
Aadam did not prove his argument over Musa in regards to Al Qadar, thinking that the sinner can use Al Qadar as an argument. Therefore, every Muslim and sane person should abstain from this because if Al Qadar had been the excuse for sinning, it would have equally been one for Iblees, the people of Nuh, the people of Hud and every disbeliever.
Abuabdilmaalik Abdulhaqq Ibn Islaam