It is narrated from Sayyiduna Miqdam (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) struck him on his shoulders and said: "O Qudaym! You will have succeeded if you die in such a state that you were neither a governor, nor a scribe, nor an overseer ('arif)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب قسم الفيء والغنيمة / 13047