Assalam alaikoum wa Rahmatullaah wa Barakaatuh,
The tale of the Cave
This story is taken from Sahih Al-Bukhari, 4/3465:
Narrated Ibn Umar radiallahu anhu: Allah’s Messenger sallallahu alayhi salaam said,
“Once three persons (from the pervious nations) were travelling , and suddenly it started raining and they took shelter in a cave. The entrance of the cave got closed (suddenly by the falling of a huge rock) while they were inside. They said to each other, ‘O You! Nothing can save you except the truth, so each of you should ask Allah’s Help by referring to such a deed as he thinks he did sincerely (i.e., just for gaining Allah’s Pleasure).’
So one of them said, ‘O Allah! You know that I had a labourer who worked for me for one Faraq (i.e. three Sa’) of rice, but he departed, leaving it (i.e. his wages). I sowed that Faraq of rice and with its yield I bought cows (for him). Later on when he came to me asking for his wages, I said (to him): Go to those cows and drive them away. He said to me: But you have to pay me only a Faraq of rice. I said to him: Go to those cows and take them, for they are the product of that Faraq (of rice). So he drove them. O Allah! If You consider that I did that for fear of You, then please remove the rock.’
The rock shifted a bit from the mouth of the cave.
The second one said, ‘O Allah! You know that I had old parents whom I used to provide with the milk of my sheep every night. One night I was delayed and when I came, they had slept, while my wife and children were crying with hunger. I used not to let them (i.e. family) drink, unless my parents had drunk first. So I disliked to wake them up and also disliked that they should sleep without drinking it, I kept on waiting (for them to wake) till it dawned. O Allah! If You consider that I did that for fear of You, then please remove the rock.’
So the rock shifted and they could se the sky through it.
The third one said, ‘O Allah! You know that I had a cousin (i.e. paterna uncle’s daughter) who was most beloved to me and I sought to seduce her, but she refused, unless I paid her one hundred Dinars (i.e. gold pieces). So I collected the amount and brought it to her, and she allowed me to sleep with her. But when I sat between her legs, she said: Be Afraid of Allah, and do not deflower me but legally. I got up and left the hundred Dinars (for her). O Allah! If You consider that I did that for fear of You then please remove the rock.’
So Allah released them (removed the rock) and they came out (of the cave).”
This Hadeeth indicates that one can only ask Allah for help directly or through his performed good deeds. But to ask Allah through dead or prophets, saints, spirits, holy men, angels is absolutely forbidden in Islam and it is a kind of Polytheism.