TODO Tasks, API and linkedResources collection

Sam Clopton 6 Reputation points
2021-05-10T16:45:52.633+00:00

Hi, when adding/editing a task, we want to be able to attach two linked resources, since a task has a collection of linked resources, and the API documentation seems to indicate that this should not be a problem, especially since it is a collection and not a single resource. However, when I try to add more than one linked resource to a task, I am receiving the following error message:

{
  "error": {
    "code": "invalidRequest",
    "message": "Only one item in linkedResources is allowed.",
    "innerError": {
      "code": "InvalidModel",
      "date": "2021-05-10T16:33:45",
      "request-id": "01caa18d-779c-421d-88fc-e88c09750943",
      "client-request-id": "08b01229-8766-8382-80de-aaa1e2a9ca5f"
    }
  }
}

Is there a way to add multiple resources? If not, why is it a collection, and should the documentation be updated to clarify that only one linked resource can be attached?

Thanks,
Sam

Microsoft Graph
Microsoft Graph
A Microsoft programmability model that exposes REST APIs and client libraries to access data on Microsoft 365 services.
10,675 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Danstan Onyango 3,741 Reputation points Microsoft Employee
    2021-05-12T07:51:55.433+00:00

    I see the same behavior and as you said, I think only one linkedResource is supported. I have created this document issue to seek for clarity.

    As for a way to attach more than one, I don't think there is as only one seems to be supported. I tried POST /me/todo/lists/{todoTaskListId}/tasks/{taskId}/linkedResources which also returns the same error.

    0 comments No comments