All perfect praise be to Allah the Lord of The Worlds. May His blessings and peace be upon our Prophet Mohammad and upon all his family and companions.
Asking Allah by His Prophet Mohammad (PBUH) is permissible according to the Shafie school of thought as well as the majority of the Hanafi, Maliki and Hanbali scholars, as stated in their accredited books. This is because the Prophet`s high status in the sight of Allah is firmly established in the Quran and the Prophetic Sunnah. Thus, there is no harm in invoking Allah by what is firmly established for this is included in the general meaning of the following verse: "O ye who believe! Do your duty to Allah, seek the means of approach unto Him, and strive with might and main in his cause: that ye may prosper." (Al-Mai`dah/35). Moreover, there is a special Hadith mentioned in this regard: `Uthman bin Hunaif narrated that a blind man came to the Prophet (PBUH) and said: “Supplicate to Allah to heal me.” He (PBUH) said: “If you wish I will supplicate for you, and if you wish, you can be patient, for that is better for you.” He said: “Then supplicate to Him.” He said: “So he ordered him to perform Wudu’ and to make his Wudu’ complete, and to supplicate with this supplication: ‘O Allah, I ask You and turn towards You by Your Prophet Muhammad (PBUH), the Prophet of Mercy. Indeed, I have turned to my Lord, by means of You, concerning this need of mine, so that it can be resolved, so O Allah so accept his intercession for me (Allāhumma innī as’aluka wa atawajjahu ilaika binabiyyka Muḥammadin nabi-ir-raḥmati, innī tawajjahtu bika ila rabbī fī ḥājatī hādhihī lituqḍā lī, Allāhumma fashaffi`hu fīyya). {Reported by Tirmithi, No. 3578}.
Commenting on the etiquettes of visiting the grave of the Prophet Mohammad (PBUH), Imam An-Nawawi stated: "It is permissible, while facing the grave, to ask Allah by his Prophet Mohammad (PBUH)." {Al-Athkaar, pp.205}.
Al-kamal Ibn Al-Humam (May Allah have mercy on him) said: "It is permissible for a Muslim to ask Allah by the virtue of the intercession and the status of the Prophet Mohammad (PBUH)."
Moreover, it is stated: "A supplication is mentioned indicating that he (Al-Adawi) had asked Allah by virtue of the intercession of the Prophet Mohammad (PBUH), his family and companions." [Hashiyat Al-Adawi, vol.1pp./5].
Al-Bahooti (May Allah have mercy on him) said: "It is permissible to ask Allah by the saints…" {Khashaf Al-Khinaa`, vol.2/pp.73}.
Anyway, asking Allah by the Prophet Mohammad (PBUH) shouldn`t be a cause of dispute and conflict. Although among the scholars prohibiting this, Ibn Taimiyah said: "Since some scholars are of the view that asking Allah by the Prophet Mohammad (PBUH) is permissible while others stated that it isn`t, then this is a matter of disagreement that should be settled on basis of the Quran and the Sunnah. Each party should present its evidence according to the common practice followed in such matters. Accordingly, whichever party errs in its Ijtihad (Individual independent reasoning) isn`t liable for any punishment." {Majmou` Al-Fatawa, vol.1/pp.285-286}. And Allah The Almighty Knows Best.