Question: "I went out with the Jamaa’ah at-Tableegh to India and Pakistan. We used to congregate and pray in masaajid within which there were graves and I heard that the salaah in a masjid within which there is a grave is invalid. What is your opinion of my salaah and should I repeat them? What is the ruling about going out with them to these places?"
Response: "Indeed, the Jamaa’ah at-Tableegh do not have real knowledge pertaining to issues of ‘aqeedah so it is not permissible to go out with them except for the one who has real knowledge of the correct ‘aqeedah of Ahlus-Sunnah wal-Jamaa’ah. In this, he can enlighten them, advise them and co-operate with them in good because they are active in their affairs. However, they are in need of more knowledge from those who can enlighten them amongst the scholars of Tawheed and Sunnah. May Allaah grant everyone understanding of the religion and firmness upon it.
As for the salaah in the masaajid within which are graves, then it is incorrect and it is obligatory upon you to repeat all that you did (in those masaajid) due to that which the Prophet (sal-Allaahu 'alayhe wa sallam) said:
"Allaah has cursed the Jews and the Christians who have taken the graves of their Prophets’ as places of worship" – it’s authenticity is agreed upon.
Also, his (sal-Allaahu 'alayhe wa sallam) statement:
"Indeed those before you used to take the graves of their Prophets’ and pious people as places of worship, so do not take the graves as places of worship, for certainly I prohibit you from that", transmitted by Muslim in his Saheeh.
And the ahaadeeth on this subject are numerous - and with Allaah lies all success and may Allaah send prayers upon our Prophet Muhammed, his family and his companions.