All perfect praise be to Allah, The Lord of The Worlds, and may His blessings and peace be upon our Prophet Mohammad and upon all his family and companions.
Invoking Allah by His righteous servants, by good deeds or by His Prophet(PBUH) is permissible according to the Shafii school of thought as well as the majority of the Hanafi, Maliki and Hanbali scholars in their accredited books. 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, the Prophet`s high rank before Allah is firmly established in the Quran and the Prophetic Sunnah, so there is no harm in invoking Allah by what is firmly established, or by His righteous servants. Narrated Anas: Whenever drought threatened them, `Umar bin Al-Khattab, used to ask Al-Abbas bin `Abdul Muttalib to invoke Allah for rain. He used to say, "O Allah! We used to ask our Prophet to invoke You for rain, and You would bless us with rain, and now we ask his uncle to invoke You for rain. O Allah ! Bless us with rain."(1) And so it would rain."{Bukhari}.
In addition, Abdullah bin 'Umar reported: I heard Allah's Messenger (PBUH) as saying: Three persons belonging to the earlier Ummahs set out on a journey until they had to spend a night in a cave. The rest of the hadith is the same and the additional words are:" A person amongst them said: O Allah, I had my aged parents and I served them milk before I (served that) to my wife, children and my servants." And in case of the second one, the words are: "She avoided me until she was hard pressed because of famine and she came to me and I gave her one hundred and twenty dinars." And in case of the third one (the words are):" I invested his wages, and it brought profit and, as a result thereof, the merchandise increased and there was an abundance of goods." And he (the narrator said) that they got out of the cave and began to walk.{Sahih Muslim}. Based on these narrations, a Muslim is allowed to invoke Allah by the infants, the praying elderly, or parents, which is, in fact, invoking Allah by their bowing in prayer to Him.
It was stated in{al-Mohazzab fi Fiqh al-Imam ash-Shafii, 1/231}, "It is permissible to invoke Allah by the old aged people and the infants, for the Prophet(PBUH) said, " Had it not been for the infants, the grazing cattle and the bowing servants, Allah would have punished them severely" Therefore, if Istisqa(invocation for rain) by them is permissible, as stated in this narration, so is invoking Allah, because it is seeking their intercession with Him.
In conclusion, it is important to pay attention to the fact that invoking Allah is a supplication that people make to Him, not to those whose intercession with Him is being saught. Indeed, Allah, The Almighty, is the One that answers the supplication. And Allah knows best.