(Yoosuf) 12 : 98
قَالَ سَوْفَ أَسْتَغْفِرُ لَكُمْ رَبِّي ۖ إِنَّهُ هُوَ الْغَفُورُ الرَّحِيمُ
He said: "I will seek forgiveness for you to my Lord; indeed He, He is the Forgiving, the Merciful".
One shouldn't obey any person even any Messenger against Adhikr-the Permission of Lord-as explained in verse 4: 64. Messengers and believers are not permitted to seek forgiveness for the hypocrites and Mushriks even though they are their father, mother, siblings or near ones as explained in verses 9: 113-114. See explanation 8: 2-4, 74-75 and 9: 31.