Joseph supplicates to Allah to be permitted to die in submission as a Muslim 12:101-4
12:101 Lord, You have given me the kingdom and taught me to interpret visions. Originator of the heavens and the earth, my Guardian in this world and in the Everlasting Life. Let me die in submission (as a Muslim) and let me join the righteous.'