When using the Graph API I can successfully create a task, I then wish to update the task details, specifically the description and to add some references.
I'm following the documentation here https://graph.microsoft.io/en-us/docs/api-reference/beta/api/taskdetails_update
I add the request headers, Authentication Bearer, If-Match using the eTag from when I created the task. The URL is:
https://graph.microsoft.com/beta/tasks/6oqAlz30WE66F915zUcSepYAM2ki/details
Http method used is PATCH Body is:
{
"description": "My Task Title description",
"references": {
"https://tenant.sharepoint.com/teams/teamsite/_layouts/15/WopiFrame.aspx?sourcedoc={521F1D0F-397D-4163-BB16-7C9EF436650B}&file=Release Notes.one&action=view&DefaultItemOpen=1": {
"alias": "OneNote",
"type": "OneNote"
}
}
}
Http response is:
StatusCode: 400, ReasonPhrase: 'Bad Request'
Response Content is:
{
"error": {
"code": "",
"message": "The request is invalid.",
"innerError": {
"request-id": "4e2eae7d-9587-4a69-8c9d-40c5d571190a",
"date": "2016-06-24T10:57:33"
}
}
}
Any ideas as to what I may be doing wrong here?
Coding in C# .Net using HttpClient, HttpRequestMessage.