The Prophet ﷺ said: He said: He who sticks to a king is perverted. This version adds: The nearer a servant (of Allah) goes to a king, the farther he keeps away from Allah.
عَنِ النَّبِيِّ ﷺ بِمَعْنَى مُسَدَّدٍ قَالَ وَمَنْ لَزِمَ السُّلْطَانَ افْتُتِنَ زَادَ وَمَا ازْدَادَ عَبْدٌ مِنَ السُّلْطَانِ دُنُوًّا إِلاَّ ازْدَادَ مِنَ اللَّهِ بُعْدًا