It is authentically established that Allah forbade His Prophet to seek forgiveness for the idolaters and the hypocrites and informed him that He would never pardon them, as in His saying, “Indeed Allah does not forgive that partners be associated with Him, but He forgives whatever is less than that for whom He wills.” ⦗Al-Nisāʾ 48, 116⦘, and His saying, “Do not ever pray over any one of them who dies, nor stand by his grave; they rejected Allah and His Messenger and died as defiantly disobedient.” ⦗Al-Tawbah 84⦘.
He, exalted is He, also said, “Call upon your Lord with humility and in private; surely He does not love the transgressors.” ⦗Al-Aʿrāf 55⦘—that is, those who transgress in supplication. Among the forms of transgression in supplication is for a servant to ask for what the Lord would never do: for example, to request the stations of the prophets while he is not one of them, or to ask forgiveness for the polytheists, and the like; or to ask for something that involves disobedience to Allah, such as aid in disbelief, sin, or rebellion.
Thus, the intercessor whom Allah allows to intercede will do so only with a supplication that contains no transgression. If any of them were to make a supplication that is unbefitting, he would not be confirmed in it, for they are protected from being left upon such an error. Noah, for instance, said, “My Lord, my son is of my family, and surely Your promise is true, and You are the wisest of judges.” ⦗Hūd 45⦘, whereupon Allah said, “O Noah, he is not of your family; indeed, he is a deed…"