Based on your username, it seems that you're new to management.
In most organizations, a person's manager is responsible for determining what tasks they work on. If an employee doesn't like their assigned tasks, they are typically welcome to provide that feedback, but ultimately, it's the manager's call, not theirs.
On the one hand, you want your employees to be happy and to do work that they enjoy. On the other hand, you - as a leader - have specific work that needs to be done. When those two priorities don't align, you can consider the following:
- First, make sure you have clear work assignment practices and you are making clear assignments, along with some type of guardrail in terms of expectations (due dates, format or content of the deliverables, and so on).
- Make sure you have some sort of feedback loop so you know what work your employees are doing, if they're having issues, and if they're on track. This may seem obvious, but if you're giving someone a year long assignment, don't wait a year before you check on how it's going.
- Speak to the employee to determine why they don't like an assignment. There may be things floating under the surface that you're not aware of. Maybe they don't like someone on that team, or they don't understand the work, or they don't understand that it's important, or they think they don't know the right technologies, or something else. If the feedback is actionable, take action on it.
Ultimately, if you're setting clear expectations, making specific work assignments, and helping your staff navigate any obstacles, you're basically doing what's expected of you (as a manager). If your staff are not happy, and they choose not to do what's expected of them, you need to address that. This may mean any of the following:
- Get the person the training, tools, or support they need to do their job
- Work on potential re-assignment to a department where they would be better suited and happier
- Work on a performance improvement plan to formally coach them on improving their ability to do their assigned tasks
Before you do though, you need to be ready to accept that fact that some people just don't work out in some positions. Going back to the two objectives above, it's ideal when someone's interests and skills align with the work you need them to do, but when that doesn't happen, it may be best for everyone if the person finds another job.