Sunan Ibn Majah, Book 13, Hadith 2 (Ibn Majah 2309)

It was narrated from Anas bin Malik that the Messenger of Allah (ﷺ) said:

“Whoever asks to be appointed a judge, will be entrusted to himself, but “Whoever asks to be appointed a judge, will be entrusted to himself, but whoever is forced to accept position, an angel will come down to him and guide him.' ”