Consider his feelings now that his dream has come true. He prays to Allah: 'My Lord! You have indeed bestowed on me of the sovereignty, and taught me the interpretation of dreams; The (only) Creator of the heavens and the earth! You are my Wali (Protector, Helper, Supporter, Guardian, etc.) in this world and in the Hereafter, cause me to die as a Muslim (the one submitting to Your Will), and join me with the righteous." Surah 12: 101
Joseph arranged an audience with the king for himself and his family, to ask the king's permission for them to settle in Egypt. Joseph was an asset to the kingdom, and the king was happy to have him remain with his household. Joseph prostrated to Allah in gratitude.