It is narrated from authentic chains from Imam Ja’far Sadiq (a.s.) that once a Jew came to the Holy Prophet (S) and stared at him. The Prophet asked what he wanted. He said: “Are you better or Musa bin Imran with whom the Almighty Allah conversed and gave him Taurat and the miracle of staff and split the sea for him and shaded him with a cloud? It is detestable that a person should praise himself, but it is necessary for me to make you aware.
When Adam committed Tarke Awla he sought divine forgiveness through the words: O the Almighty Allah please forgive me for the sake of Muhammad and Aale Muhammad. So the Almighty Allah forgave him. When Nuh boarded the Ark and he feared drowning, he said: O Lord, I ask you to protect from drowning for the sake of Muhammad and Aale Muhammad. So the Almighty Allah saved him.
And when Ibrahim was thrown into the inferno, he asked for our sake and the Almighty Allah made the fire cool and comfortable for him. And when Musa cast his staff and it turned into a python, he said: For the sake of Muhammad and Aale Muhammad make me fearless. So the Almighty Allah revealed to him: Don’t fear, you will be victorious.” O Jew, if Prophet Musa (a.s.) had been present in this age, and had no faith in me and my prophethood, his faith and prophethood would have given no advantage. O Jew, the Mahdi will be from my progeny.
When he will reappear, Isa (a.s.) will come down from the heavens to assist him and pray behind him. It is mentioned in another tradition from the same Imam that when Adam ate from the forbidden tree, he raised his head and said: O Allah, for the sake of Muhammad and Aale Muhammad have mercy on me.
So the Almighty Allah revealed to him: “Who is Muhammad?” He replied: “My God, when you created me I looked at the Arsh on which was inscribed: There is no god except Allah and Muhammad is the Messenger of Allah. I understood that no one is having such a status in Your view, such that You have mentioned their names with Your name.”
The Almighty Allah revealed: “O Adam, he is from your progeny and is the last of the prophets. If he had not been there, I would not have created you.” It is mentioned in another tradition from Amirul Momineen (a.s.) that the words that Adam (a.s.) learnt from the Almighty Allah and which enabled him to earn forgiveness were: “O God, for the sake of Muhammad accept my repentance.
Reference:Hayat Al-Qulub Vol. 2