Planner tasks assignee is not getting updated properly using Graph API
Category
- [x] Bug
Describe the bug
When we try to update assignee of planner tasks, assigned user details not getting updated properly. Task is assigned to User-A, when I try to update the the task with User-B, the User-B gets appended to Assignee and the assigned users will be User-A and User-B instead of just User-B. Here we are trying to update the task details using graph API patch operation. Graph API patch operation is not returning any issues but user details are not getting updated properly.
Steps to reproduce
Used below graph API call to update the assigned users
this.graphClient = await this.webPartContext.msGraphClientFactory.getClient();
const taskDetails = await this.graphClient
.api(planner/tasks/${taskId})
.version('v1.0')
//.header(If-Match, etag)
.headers({["Prefer"]: "return=representation", ["if-Match"]: etag, ["Content-type"]: "application/json"})
.patch({assignments : Userdetails});
Expected behavior
Task should get updated with only User-B
Environment details (development & target environment)
SharePoint online
Additional context
Thanks for your contribution! Sharing is caring.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
This isn't a SharePoint topic... this should be posted to the Graph API feedback forums.
Thank you for your submission. As explained in our wiki (Issue List: What doesn't belong in the issue list), this issue list is for SharePoint developer/development issues. All capability question/discussion questions, or topics related to SharePoint administration & end-user topics should be reported through the support user interface available in the tenant admin settings. You can also have a discussion and ask questions at the SharePoint TechCommunity forum. You can learn more about this in our wiki: type:invalid-not-dev-issue