Praying behind a sufi imam
Question

We have a sufi imam. Is it valid to pray behind him?.
Praise be to Allah.Of the words, deeds and beliefs that are unique to the Sufis and have no basis in the Book of Allah and the Sunnah of His Prophet (peace and blessings of Allah be upon him), some are bid’ahs (innovations) that constitute kufr, and some are bid’ahs that do not constitute kufr. If this imam follows bid’ahs that constitute kufr, you should not pray behind him. If he follows bid’ahs that do not constitute kufr, then it is permissible to pray behind him although someone else who is a follower of ahl al-sunnah would undoubtedly be better. 
Shaykh ‘Abd al-‘Azeez ibn Baz (may Allah have mercy on him) said: 
If I come to a village where the imam is a sufi who does not hold one hand over the other when praying, and he does not go down on his knees before his hands when prostrating, is it permissible to pray with him? 
He replied: 
If he is known to believe in Tawheed and not shirk, and he is only a little ignorant or follows a few ideas of Sufism (tasawwuf), but he is a believer in Tawheed and a Muslim who worships Allah alone and does not worship Shaykhs or any other created being, such as Shaykh ‘Abd al-Qaadir etc, and the only problem is that he does not hold one hand over the other when praying, then there is no reason not to pray behind him, because this is something that is Sunnah, not obligatory. Holding one hand over the other means placing the right hand over the left hand, wrist and forearm over the chest when standing in prayer. The one who lets his arms hang by his sides is not doing anything wrong and his prayer is valid. …  
Fatawa al-Shaykh Ibn Baz (12/120, 121). 
Shaykh ‘Abd al-‘Azeez ibn Baz (may Allah have mercy on him) was also asked: 
What is the ruling on praying behind someone who goes to the graves of righteous people to seek blessing from them and to recite Qur'aan on the Mawlids and other occasions in return for payment? 
He replied: 
This is subject to further discussion. If he merely celebrates the Mawlid without any shirk involved, then he is an innovator and he should not be an imam, because it is proven in the saheeh hadeeth that the Prophet (peace and blessings of Allah be upon him) said: “Beware of newly-invented matters because every newly invented matter is an innovation (bid’ah) and every innovation is a going astray.” Narrated by Abu Dawood (3991). And celebrating the Mawlid (Prophet’s birthday) is an innovation. But if he prays to the dead and seeks help from them or from the jinn or other created beings, and he says “O Messenger of Allah help me or heal my sick loved one” or he says  “Ya Sayyidi al-Husayn” or “Ya Sayyidi al-Badawi” or calls upon any other dead person, or prays to inanimate things such as idols, saying “al-madad al-madad (help, help)”, then he is a mushrik who is guilty of major shirk, and you should not pray behind him and his leading the prayers is not valid. We ask Allah to keep us safe and sound. 
But if he commits bid’ah such as attending the Mawlid but he does not do any act of shirk, or he reads Qur’aan beside graves, or he prays at the graves, but he does not do any act of shirk, then he has introduced innovation into the religion, so he should be taught and directed towards what is good, but his prayer is valid if he does not pray by the graves. As for his prayers in the graveyard, they are not valid, because the Prophet (peace and blessings of Allah be upon him) said: “May Allah curse the Jews and the Christians, for they have taken the graves of their Prophets as places of worship.” Agreed upon. 
Fatawa al-Shaykh Ibn Baz (9/373, 374 and 12/108, 109). 
Ends.