Of the position during which it is permissible for a Muslim to invoke Allah is between Tashahhud (a recitation in the sitting position in the second/ last unit of Prayer) and Taslim (the end of Salah).
It was authentically reported in Sahih Al Bukhari and Sahih Muslim on the authority of `Abdullah ibn Mas`ud (may Allah be pleased with him) that the Prophet (peace be upon him) taught him Tashahhud then said at the end: "Then a person may choose the invocation he likes to use it in invocation." [Sahih Al Bukhari, No. 835, and Sahih Muslim No. 402]. Another narration of Imam Muslim: "Then he should choose of invocation whatever he likes." [Sahih Muslim No. 402]. It is better for a Muslim in this position to say the invocations reported from the Prophet (peace be upon him), however if a person uses other invocations that do not contain anything illegal, there is no harm.
Here are some reported invocations to be said in this position: It was reported in Sahih Al Bukhari and Sahih Muslim on the authority of Abu Hurayrah (may Allah be pleased with him) that he said: The Messenger of Allah (peace be upon him) said: "When anyone of you has done his Tashah-hud during Salah, he should seek refuge in Allah against four thingsand say:"Allahumma inny A`udhu bika min `Adhabin jahannam, wa min `Adhabil-Qabr, wa min fitnatil-mahya wal-mamat, wa min sharri fitnatil-masihid-dajjal (O Allah! I seek refuge in You from the torment of Hell, from the torment of the grave, from the trials of life and death, and from the mischief of Al-Masih Ad-Dajjal (Antichrist)." (3) [Sahih Al Bukhari, No. (1377) and Sahih Muslim No. 588].
Some scholars adopted the view that reciting Isti`adhah before ending Salah is obligatory, whereas the majority of scholars adopt the view that it is desirable, not obligatory.
As for the Prophet's saying: "Min `Adhabi Jahannam," he advanced the torment of Hell because escaping Hell is the main objective, and Jahannam is the name of Hell-Fire which Allah prepared for the disbelievers on the Day of Recompense.
As for his saying: "Wa min `Adhabil-Qabr," it proves that the torment of the grave is true and a Muslim should seek refuge in Allah against it. As for his saying: "wa min fitnatil-mahya wal-mamat, " i.e., life and death, and the meaning is seeking refuge in Allah against all trials in the world and in the Hereafter [trials that may harm the religion, body, or the world of a person, and the trials of death and the following horrors].
As for his saying: "Wa min sharri fitnatil-Masihid-Dajjal," he is one of the fountains of disbelief and error and one of the sources of trials. He shall go out to the people at the end of time and it is one of the portents of the Hour. He was called "Masih" because one of his eyes is smeared, so he is one-eyed. Moreover, he was called "Dajjal" from the verb "Dajal" which means to tell lies, and his emergence is one of the greatest trials; and each Prophet warned his people of Ad-Dajjal.
It was reported in Sahih Al Bukhari and Sahih Muslim on the authority of `A'ishah (may Allah be pleased with her) that the Messenger of Allah (peace be upon him) used to invoke Allah during Salah saying: "Allahumma inny A`udhu Bika Min `Adhabil-Qabr, Wa A`udhu Bika min Fitnatil-Masihid-Dajjal, Wa A`udhu Bika Min Fitnatil-Mahya Wa Fitnatil-Mamati. Allahumma inny A`udhu Bika Minal-Ma'thami Wal-Maghram. (O Allah, I seek refuge with You from the punishment of the grave and from the afflictions of Masih Ad-Dajjal and from the afflictions of life and death. O Allah, I seek refuge with You from the sins and from being in debt)." Somebody said to him: Why do you so frequently seek refuge with Allah from being in debt? The Prophet (peace be upon him) replied: A person in debt tells lies whenever he speaks, and breaks promises whenever he makes (them). [Sahih Al Bukhari, No. 833 and Sahih Muslim No. 589]. Ma'tham is the things for which a person deserves sins and faults. Al Maghram is the expiation which a person should pay because of a felony, a transaction, or something else; so Ma'tham refers to the right of Allah, and Maghram refers to the rights of people.
Of the invocations reported in this regard is the Hadith that was reported by Imam Muslim in his Sahih on the authority of `Ali ibn Abu Talib (may Allah be pleased with him) that the Messenger of Allah (peace be upon him) used to say between Tashah-hud and Taslim: "Allahumma ighfir Li Ma Qaddamtu Wama Akh-Khart, Wama Asrartu Wama A`lant Wama Asraft, Wama Anta A`lamu Bihi Minni, Anta Al Muqaddimu Wa Anta Al Mu'akh-Khir, la ilaha illa Ant [O Allah, forgive my previous and future sins; whatever I concealed or revealed, and whatever I have gone too far in, and the things which I did and You know then better than me. You are the One who makes (some people) forward and (some) backward. There is none to be worshipped but you.]." [Sahih Muslim No. 771].
As for the Prophet's saying: "My previous and future sins," any mistake, fault, or negligence that was done previously or in the future. "Wama Asrartu Wama A`lant," i.e., what I have done secretly and publically. "Wama Asraft," i.e., what I have gone too far by oppressing myself or committing sins. "Anta Al Muqaddimu," you advance some people by guidance and repentance. "Wa Anta Al Mu'akh-Khir," i.e., You make some people defer by failure and deprivation. "la ilaha illa Ant," i.e., no one is worthy of worship but You.