Narrated Muslim bin Yasar Al-Juhani:
that 'Umar bin Al-Khattab was asked about this Ayah: And when your Lord brought forth from the Children of Adam, from their loins, their seed and made them testify as to themselves: Am I not your Lord? They said: Yes! We testify, lest you should say on the Day of Resurrection: 'Verily, we have been unaware of this (7:172).' So 'Umar bin Al-Khattab said: I heard the Messenger of Allah (ﷺ) being asked about it. So the Messenger of Allah (ﷺ) said: 'Indeed Allah created Adam, then He wiped his back with His Right Hand, and his offspring came out of him. So he said: I created these for Paradise, and they will do the deeds of the people of Paradise. Then He wiped his back, and his offspring came out of him. So He said: I created these for the Fire, and they will do the deeds of the people of the Fire. A man said: 'Then of what good is doing deeds O Messenger of Allah!' The Messenger of Allah (ﷺ) said: 'Verily, when Allah created a man for Paradise, He makes him perform the deeds of the people of Paradise, until he dies doing one of the deeds of the people of Paradise. So Allah will admit him into Paradise. And when He created a man for the Fire, He makes him perform the deeds of the people of the Fire until he dies doing the deeds of the people of the Fire. So Allah will enter him into the Fire.'