Well… no one knows about what the previous prophets said about their religion. The only clue about this is by reading the holybook, that is the Holy Quran.
When his Lord said to him, “Submit! (=Aslim!)”, he said “I have submitted [in Islam] (=aslama) to the Lord of the worlds (universe).” [QS. Al-Baqarah 131]
And Abraham instructed his sons [to do the same] and [so did] Jacob, [saying], “O my sons, indeed Allah has chosen for you this religion, so do not die except while you are Muslims.” [QS. Al-Baqarah 132]
Or were you witnesses when death approached Jacob, when he said to his sons, “What will you worship after me?” They said, “We will worship your God and the God of your fathers, Abraham and Ishmael and Isaac – one God. And we are Muslims [in submission] to Him.” [QS. Al Baqarah 133]
Say, [O believers], “We have believed in Allah and what has been revealed to us and what has been revealed to Abraham and Ishmael and Isaac and Jacob and the Descendants and what was given to Moses and Jesus and what was given to the prophets from their Lord. We make no distinction between any of them, and we are Muslims [in submission] to Him.” [QS. Al-Baqarah 136]