Shaykh Yasir Qadhi discusses Verses 21 to 29 of Surah Yusuf where we gather information about him growing up in the house of a very famous minister in Egypt and what happened to him over there.
The person who purchased him as a slave was a kind and gentle person who wanted to adopt him and treat him with compassion. He was in fact the right hand man of the king of the time and was a position of power and influence.his name was Azeez. When Yusuf AS reached manhood at around 18 years of age under the care of Azeez and his wife, he was given knowledge and wisdom by Allah SWT on account of righteousness.
The woman in whose house Yusuf AS lived tried to seduce him on account of his extremely good looks. She tried to force herself on Yusuf AS one fine day. What happens at that time? Yusuf AS says to her – Allah is the One whom I seek refuge in! He is my Lord who has been so generous to me.