friend in court

Also,friends in high places. A person or persons who can help by virtue of their important position. For example, With a friend in court, he has a good chance of getting the contract, or Jim thinks he can get out of paying the fine; he has friends in high places. This expression alludes to the power of a person at the royal court. With the decline of monarchies, high places came into more common use.
[ c. 1400
]