It has been reported on the authority of 'Abd al-Rahman b. Samura who said
The Messenger of Allah (ﷺ) said to me: 'Abd al-Rahman, do not ask for a position of authority, for if you are granted this position as a result of your asking for it, you will be left alone (without God's help to discharge the responsibilities attendant thereon), and it you are granted it without making any request for it, you will be helped (by God in the discharge of your duties).
The same tradition has been narrated through a different chain of transmitters.
It has been narrated by Abu Musa who said
Two of my cousins and I entered the apartment of the Prophet (ﷺ). One of them said: Messenger of Allah, appoint us rulers of some lands that the Almighty and Glorious God has entrusted to thy care. The other also said something similar. He said: We do not appoint to this position one who asks for it nor anyone who is covetous for the same.
It has been reported on the authority of Abu Musa who said
I went to the Prophet (ﷺ) and with me were two men from the Ash'ari tribe. One of them was on my right hand and the other on my left. Both of them made a request for a position (of authority) while the Prophet (ﷺ) was brushing his teeth with a tooth-stick. He said (to me): Abu Musa (or 'Abdullah b. Qais), what do you say (about the request they have made)? I said: By God Who sent thee on thy mission with truth, they did not disclose to me what they had in their minds, and I did not know that they would ask for a position. The narrator says (while recalling this hadith): I visualise as if I were looking at the miswak of the Prophet (ﷺ) between his lips. He (the Holy Prophet) said: We shall not or shall never appoint to the public offices (in our State) those who with to have them, but you may go, Abu Musa (or Abdullah b. Qais) (to take up your assignment). He sent him to Yemen as governor. then he sent Mu'adh b. jabal in his wake (to help him in the discharge of duties). When Mu'adh reached the camp of Abu Musa, the latter (received him and) said: Please get yourself down; and he spread for him a mattress, while there was a man bound hand and foot as a prisoner. Mu'adh said: Who is this? Abu Musa said: He was a Jew. He embraced Islam. Then he reverted to his false religion and became a Jew. Mu'adh said: I won't sit until he is killed according to the decree of Allah and His Apostle (ﷺ) (in this case). Abu Musa said: Be seated. It will be done. He said: I won't sit unless he is killed in accordance with the decree of Allah and His Apostle (ﷺ). He repeated these words thrice. Then Abu Musa ordered him (to be killed) and he was kilied. Then the two talked of standing in prayer at night. One of them, i. e. Mu'adh, said: I sleep (for a part of the night) and stand in prayer (for a part) and I hope that I shall get the same reward for steeping as I shall get for standing (in prayer).