thankless role; ungracious part
Refers to a role or task that is necessary but brings dislike or criticism, such as the 'bad guy' in a group or the person who must enforce unpopular rules.
He always takes on the thankless role.
Voicing opposing opinions in meetings is a thankless task.