Short answer
Asking Allah through His names, through your own good deeds, or by asking a living righteous person to pray for you is agreed upon. Asking Allah by the status of the Prophet ﷺ or a righteous person is allowed by the Hanafi scholars of Deoband and most later scholars, while some scholars hold it is not allowed. The dua itself is always made to Allah alone.
Tawassul (seeking a means to Allah) through His names and attributes, one's good deeds, and the dua of a living person is permissible by agreement. Saying "O Allah, I ask You by the status (jah) or blessing of Your Prophet" is permissible according to the Deobandi Hanafi scholars; Imam Abu Hanifa disliked the wording "by the right (haqq) of so-and-so", since no creature has a right over Allah. Asking the dead themselves to fulfil needs is not allowed.
The four schools agree on this.
Explanation
Allah tells the believers to "seek the means of nearness to Him" (5:35). The Prophet ﷺ told of three men trapped in a cave who agreed that only calling on Allah by their righteous deeds would save them; each mentioned a deed done for Allah and the rock moved. Asking through Allah's names and through your own good deeds, and asking a living person to pray for you, are agreed upon by all.
The point of difference is asking Allah by the status of the Prophet ﷺ or a righteous person. A blind man came to the Prophet and was taught to make wudu and say: "O Allah, I ask You and turn to You through Your Prophet Muhammad, the Prophet of mercy." The Hanafi scholars, and most later scholars of the four schools, take this as permission to ask Allah by the Prophet's status. Another group of scholars, including Ibn Taymiyya, read it as asking through the Prophet's own dua while he was alive. They point out that in a drought Umar asked through al-Abbas, the Prophet's living uncle, saying: "O Allah, we used to seek a means to You through our Prophet, and now we seek a means through our Prophet's uncle." They hold tawassul by status is not allowed, though not shirk.
What all agree on is the boundary: dua is worship, and it is directed to Allah alone. Calling on anyone besides Allah to grant needs is forbidden (10:106). Within that boundary, this is a difference among scholars of Ahl al-Sunnah about permissibility, not about tawhid, so it should be discussed with calm and respect.
For dua at the graves of the righteous, see making dua at the grave of a saint.
The evidence
Quran, Surah Al-Maaida 5:35
يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُوا۟ ٱتَّقُوا۟ ٱللَّهَ وَٱبْتَغُوٓا۟ إِلَيْهِ ٱلْوَسِيلَةَ وَجَٰهِدُوا۟ فِى سَبِيلِهِۦ لَعَلَّكُمْ تُفْلِحُونَ ﴿٣٥﴾
O you who have believed, fear Allah and seek the means [of nearness] to Him and strive in His cause that you may succeed.
Commands seeking a means to Allah, the basis of tawassul.
Quran, Surah Yunus 10:106
وَلَا تَدْعُ مِن دُونِ ٱللَّهِ مَا لَا يَنفَعُكَ وَلَا يَضُرُّكَ ۖ فَإِن فَعَلْتَ فَإِنَّكَ إِذًۭا مِّنَ ٱلظَّٰلِمِينَ ﴿١٠٦﴾
And do not invoke besides Allah that which neither benefits you nor harms you, for if you did, then indeed you would be of the wrongdoers.'"
Sets the boundary: dua is made to Allah alone.
Jami' at-Tirmidhi 3578
Graded sahih... اللهم إني أسألك وأتوجه إليك بنبيك محمد نبي الرحمة ...
"O Allah, I ask You and turn to You through Your Prophet Muhammad, the Prophet of mercy."
The dua taught to the blind man, the main evidence for tawassul through the Prophet.
Sahih al-Bukhari 1010
Sahih... اللهم إنا كنا نتوسل إليك بنبينا فتسقينا ...
"O Allah, we used to seek a means to You through our Prophet and You would give us rain."
Umar's tawassul through al-Abbas, read differently by the two sides.
Sahih al-Bukhari 2272
Sahih... لا ينجيكم من هذه الصخرة إلا أن تدعوا الله بصالح أعمالكم ...
"Nothing will save you from this rock except calling on Allah by your righteous deeds."
Tawassul through one's own good deeds, which is agreed upon.
Where the ruling is recorded
- al-Hidaya, Kitab al-Karahiyya, chapter on miscellaneous matters. Abu Hanifa's dislike of the wording "by the right of so-and-so" in dua.
- al-Muhannad ala al-Mufannad (Khalil Ahmad Saharanpuri), Answer on tawassul. The Deobandi position permitting tawassul through the prophets and the righteous.
- Radd al-Muhtar (Ibn Abidin), Kitab al-Hazr wa al-Ibaha, discussion of wording in dua. Explains the wording that is disliked and what is permitted.
This answer is pending review by the scholars on our team. Quran translation by Sahih International. Hadith Arabic from the standard editions of the six books and the Muwatta, with gradings as recorded there; the English is our own rendering. Spotted a mistake? Tell us.