Sayyiduna Samurah (may Allah be pleased with him) said that the Prophet (peace and blessings be upon him) said: "Begging is a scratching with which a person scratches his own face; whoever wishes may preserve his face, and whoever wishes may abandon it, except that a person asks about a matter for which he has no alternative, or asks the ruler of the time."
Zayd bin Uqbah (may Allah have mercy on him) said: I said this before al-Hajjaj bin Yusuf, and he said: Ask me, for I am a man of authority.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الزكاة / 7876
Muslim bin Makhshi (may Allah have mercy on him) narrates that Ibn al-Firasi informed him that al-Firasi (may Allah be pleased with him) said to the Prophet (peace and blessings be upon him): O Prophet of Allah! May I ask (people)? He (peace and blessings be upon him) said: "No; but if you have no option except to ask, then ask the righteous."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الزكاة / 7877
Muslim bin Makhshi (may Allah have mercy on him) narrates from al-Firasi, from his father (may Allah be pleased with him), that he said to the Messenger of Allah (peace and blessings be upon him): "May I ask (people)?" He (peace and blessings be upon him) said: "No; but if you must ask, then ask the righteous."
The hadith of Sayyiduna Qabisah bin Mukhariq (may Allah be pleased with him) and other hadiths about whom asking is permitted for and whom it is not permitted for have their place in the Book of the Division of Charities.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الزكاة / 7878