get on the good side of (someone)
To become the object of someone's favor; to do something that causes someone to be pleased. Be sure to get on the good side of the superintendent— she's a powerful woman in the school district. I'm hoping to get on the good side of John with this cake I baked for him.
get/keep on the right/wrong ˈside of somebody
try to please somebody and not annoy them/annoy somebody and make them dislike you: She got on the wrong side of her boss after criticizing him in a meeting.