get on the wrong side of (someone)
To be or become displeasing to someone; to do something that provokes someone's anger, contempt, or dismissal. Be sure not to get on the wrong side of the superintendent—she's a powerful woman in the school district. I'm afraid I may have gotten on the wrong side of your friend with my off-color remarks.
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.