It is not permissible to ask Allaah by the virtue of anyone, not even by the virtue of the Prophets or Messengers or awliyaa or righteous people and NOT even by virtue of Prophet Muhammed (pbuh).
No one can compel Allaah to do anything. It is NOT permissible to ask Him in any way except by His Names and Attributes, as Allaah says (interpretation of the meaning):
“And (all) the Most Beautiful Names belong to Allaah, so call on Him by them”
With regard to saying to the occupant of a grave, “O So and so, help me,” this is obviously shirk, because it is a supplication to someone other than Allaah.
Asking by the virtue of someone is a means to shirk, and calling upon a created being is shirk in worship.
And Allaah knows best.
These behaviors are dangerous and relying upon anyone other than Allah swt is innovation. Many people give the misnomer of Mohammedians to Muslims with the idea that we worship the Prophet, pbuh. However the Quran is full of comands from Allah to not worship any one except HIM and that no one is of any avail except HIM.
Worship none but Allah. I fear for you the punishment of a painful day.’ (Qur’an, 11:26)
Say: ‘Do you worship, besides Allah, something which has no power to harm or help you when Allah is the All-Hearing, the All-Knowing?’ (Qur’an, 5:76)
So do not call on any other god along with Allah or you will be among those who will be punished. (Qur’an, 26:213)
Say, ‘People of the Book! Come to a proposition which is the same for us and you-that we should worship none but Allah and not associate any partners with Him and not take one another as lords besides Allah.’ If they turn away, say, ‘Bear witness that we are Muslims.’ (Qur’an, 3:64)
My servants, you who believe, My earth is wide, so worship Me alone! (Qur’an, 29:56)
Those to whom We gave the Book rejoice at what has been sent down to you but some of the parties refuse to acknowledge part of it. Say: ‘I have only been ordered to worship Allah and not to associate anything with Him. I summon to Him and to Him I will return.’ (Qur’an, 13:36)
Do not call on any other god along with Allah. There is no god but Him. All things are passing except His Face. Judgement belongs to Him. You will be returned to Him. (Qur’an, 28:88)
That is part of the wisdom your Lord has revealed to you. Do not set up another god together with Allah and so be thrown into Hell, blamed and driven out. (Qur’an, 17:39)
Do not set up another god together with Allah. Truly I bring you a clear warning from Him. (Qur’an, 51:51)