Hi @Anonymous ,
You can use update planner task details, in the request body can pass attachment references
property plannerexternalreferences.
A example snippet would be as below.
PATCH https://graph.microsoft.com/v1.0/planner/tasks/{task-id}/details
Content-type: application/json
Prefer: return=representation
If-Match: "JzEtVGFzayAgQEBAQEBAQEBAQEBAQEBAWCc="
{
"previewType": "noPreview",
"references": {
"https%3A//contoso%2Esharepoint%2Ecom/teams/agile/documents/AnnualReport%2Epptx": {
"@odata.type": "microsoft.graph.plannerExternalReference",
"alias": "Agile Team Annual Report",
"previewPriority": "0009005756397228702",
"type": "PowerPoint"
}
}
}
Properities like dueDateTime
and assigneePriority
can be set in POST or PATCH of plannertask.
Hope this helps.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".