Praise be to Allah.Praise be to Allaah.
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. 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” [al-A’raaf 7:180].
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.