Curry favor with (someone)

To flatter someone to get his or her help or friendship. To try to make someone like you or support you by doing or saying things to please them

Our boss has been working hard to curry favor with the other members of the committee.

The candidate has promised lower taxes in an attempt to curry favor with the voters.