As for tawassul understood as seeking mediation through the dead or the absent and petitioning Allah by their person, this is an innovated practice and is not permissible. Allah has commanded us to call upon Him directly, without inserting intermediaries between ourselves and Him in supplication. The only exception is asking a living person to pray for us, because textual evidence allows that. Concerning the dead and the absent, however, no proof exists that tawassul through them is legislated; whoever does so has introduced a newly-invented innovation into the religion.
If, on top of that, he seeks closeness to this intermediary through acts of worship—such as sacrificing animals for him, making vows to him, and the like—then this is major associationism (shirk akbar), the very practice of the early idolaters. Allah, the Exalted, says: “They worship, instead of Allah, that which can neither harm nor benefit them, and they say, ‘These are our intercessors with Allah.’” ⦗Yunus 10:18⦘; and He says: “Those who have taken patrons apart from Him say, ‘We only worship them so that they may bring us nearer to Allah in rank.’” ⦗Az-Zumar 39:3⦘. Hence, if tawassul amounts to asking a dead or absent person to fulfill one’s need, or drawing near to him by any act of worship—such as slaughtering, vowing, and so forth—this is major associationism.
However, if what is meant by tawassul is to say, “O Allah, I ask You by the right of so-and-so; I seek a means to You through so-and-so,” and similar formulas, then this too is an innovation and an invented addition to supplication. Allah knows best.
***
Supplicating to the Prophet ﷺ for the removal of harm
Question: Some people recite a supplication that they believe cures diabetes. It goes as follows: “Peace and blessings be upon you and upon your family, O my master, O Messenger of Allah. You are my means; take my hand. My resourcefulness has run out, so come to my aid.” They also add the words: “O…"