As for asking the dead, this is not religiously sanctioned: it is neither obligatory nor recommended, nor even permissible. None of the Companions or those who followed them in righteousness ever did this, nor did any of the early generations of the Muslim community recommend it. This is because it entails harm that outweighs any benefit, with no benefit that outweighs the harm. The Sharia prescribes only what brings unalloyed benefit or benefit that outweighs harm. This practice offers no such outweighing benefit; rather, it entails either pure harm or harm that outweighs its benefit, and neither is religiously sanctioned.
It has thus become clear that the Prophet’s asking others to supplicate, may Allah bless him and grant him peace, falls under showing kindness to people, which is either obligatory or recommended. Likewise, his commands to offer funeral prayers, visit the graves of believers, greet them, and supplicate for them fall under showing kindness to the dead, which is either obligatory or recommended.
Allah Most High commanded Muslims to perform prayer and give zakāh. Prayer is the right owed to the True One in this world and the Hereafter, while zakāh is the right owed to created beings. The Messenger commanded people to fulfil the rights of Allah and the rights of His servants by worshipping Allah without associating anything with Him. Worshipping Him includes showing kindness to people wherever Allah, glorified be He, has commanded it, as in offering funeral prayers and visiting the graves of believers.
But Satan gained mastery over his followers and made their purpose in these acts the association of partners with the Creator and the harming of created beings. For if their sole purpose in visiting the graves of prophets and righteous people is to make requests of them or to make requests at their graves, or if they do not intend to greet them or supplicate for them, as is intended in funeral prayers, then by doing so they are associating partners with Allah, causing harm, and wronging those whom they ask. They are also wronging themselves, thus combining all three kinds of wrongdoing.