Imam Aḥmad transmits—on the authority of Abū Mūsā al-Ashʿarī (may Allah be pleased with him)—that he said: “I once said to ʿUmar (may Allah be pleased with him), ‘I have a Christian scribe.’ He replied, ‘What is the matter with you—may Allah fight you! Have you not heard the words of Allah: “O you who believe! Do not take the Jews and the Christians as allies; they are allies of one another.” (Al-Māʾidah 5:51) Why did you not employ a ḥanīf—a Muslim?’ I answered, ‘O Commander of the Believers, he simply writes for me, and he has his own religion.’ ʿUmar said, ‘I will not honor those whom Allah has humiliated, nor elevate those whom Allah has abased, nor draw near those whom Allah has cast away.’
Imam Aḥmad and Muslim also report that when the Prophet ﷺ set out for Badr, a man from the idolaters followed him and caught up with him at al-Ḥarra. The man said, ‘I wish to follow you and obtain a share with you.’ The Prophet ﷺ asked, ‘Do you believe in Allah and His Messenger?’ He replied, ‘No.’ The Prophet ﷺ said, ‘Then go back, for I will not seek the help of a polytheist.’
From these texts it is clear that appointing disbelievers to positions of authority over Muslim affairs is forbidden.