Hazrat Moulana Ashraf Ali Thaanwi (rahimahullah) once mentioned the following:
In today’s times, there is a greater need for one to examine the deeni condition of the person one wishes to take deeni guidance from or one wishes to place his hand in the hand of such a person to become bay’at to him. The reason is that presently, there are many fake sheikhs who (in the disguise of a spiritual sheikh) take advantage of people and rob them of their deen.
A good gauge through which one will be able to determine whether a person can be taken as a deeni guide is to see how the pious servants of Allah Ta‘ala conduct and deal with such a person. If the pious and senior rightly-guided Ulama regard such a person as a Sheikh-e-Kaamil who is worthy and capable of guiding people, then one may regard such a person to be a spiritual guide.
(Malfoozaat Hakeemul Ummat 2/46)