{"id":11025,"date":"2022-08-11T13:20:13","date_gmt":"2022-08-11T20:20:13","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/?p=11025"},"modified":"2022-08-11T13:24:56","modified_gmt":"2022-08-11T20:24:56","slug":"new-features-in-microsoft-graph-to-do-apis-and-retirement-of-the-tasks-beta-api","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/new-features-in-microsoft-graph-to-do-apis-and-retirement-of-the-tasks-beta-api\/","title":{"rendered":"New features in Microsoft Graph To Do APIs and retirement of the Tasks (Beta) API"},"content":{"rendered":"<p>We are committed to providing a rich task infrastructure through the Microsoft Graph To-Do tasks APIs so partners and customers can build delightful task experiences for their users. We\u2019ve been listening to customers\u2019 requests for new features, and we\u2019re excited to share that we\u2019re releasing new capabilities in the To Do APIs, including file attachments on tasks, support for categories, and more.<\/p>\n<h2>Attachments<\/h2>\n<p>We\u2019ve introduced support for fetching, uploading and deleting <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/taskfileattachment?view=graph-rest-beta\">file attachments<\/a> on a task on the beta endpoint. There are two methods to upload attachments on a task:<\/p>\n<ol>\n<li>To attach files of any size, <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/taskfileattachment-createuploadsession?view=graph-rest-beta\">create an upload session<\/a>, and iteratively use PUT call to upload ranges of bytes of the file until you have uploaded the entire file. See <a href=\"https:\/\/docs.microsoft.com\/graph\/todo-attachments\">attach files to a To Do task<\/a> for an example.<\/li>\n<li>If the file size is under 3 MB, you can do a single POST on the attachment&#8217;s navigation property of <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/todotask?view=graph-rest-1.0\">todoTask<\/a>; See <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/todotask-post-attachments?view=graph-rest-beta\">create attachment<\/a> for an example.<\/li>\n<\/ol>\n<h2>Categories<\/h2>\n<p>Categories lets you easily tag or label tasks in To Do and it has been one of the top requests from partners. We recently released categories support on the Microsoft Graph v1 endpoint.<\/p>\n<p>Now, developers will get the <strong>categories<\/strong> as part of the response when querying for users\u2019 task. Each category corresponds to the <strong>displayName<\/strong> property of an <a href=\"https:\/\/docs.microsoft.com\/en-us\/graph\/api\/resources\/outlookcategory?view=graph-rest-1.0\">outlookCategory<\/a> that the user has defined.<\/p>\n<p><span style=\"color: inherit; font-family: inherit; font-size: 1.75rem;\">Example<\/span><\/p>\n<pre class=\"prettyprint\">GET <span style=\"text-decoration: underline;\">https:\/\/graph.microsoft.com\/v1.0\/me\/todo\/lists\/&lt;list-id&gt;\/tasks\/&lt;task-id&gt;<\/span>\r\nHTTP\/1.1 200 OK\r\n        {\r\n            \"importance\": \"high\",\r\n            \"isReminderOn\": false,\r\n            \"status\": \"completed\",\r\n            \"title\": \"Review Q1 marketing\",\r\n            \"createdDateTime\": \"2022-04-28T12:18:39.2889451Z\",\r\n            \"lastModifiedDateTime\": \"2022-06-01T04:22:16.0704279Z\",\r\n            \"categories\": [\r\n                \"Planning\",\r\n                \"Urgent\"\r\n],\r\n            \"id\": \"AAMj1YgAGEuIMbwAAAA==\",\r\n            \"body\": {\r\n                \"content\": \"\",\r\n                \"contentType\": \"text\"\r\n            }\r\n            }\r\n<\/pre>\n<h2>checklistItems<\/h2>\n<p>To Do allows breaking down a complex task into more actionable, smaller steps. Now, you can also create, read, update, and delete steps using the <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/checklistitem?view=graph-rest-1.0\">checklistItem<\/a> on the Microsoft Graph v1 endpoint.<\/p>\n<table style=\"width: 97.5294%;\">\n<tbody>\n<tr>\n<td style=\"width: 22.4719%;\" width=\"139\">Attributes<\/td>\n<td style=\"width: 20.8631%;\" width=\"138\">Type<\/td>\n<td style=\"width: 191.6%;\" width=\"339\">Description<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 22.4719%;\" width=\"139\">checkedDateTime<\/td>\n<td style=\"width: 20.8631%;\" width=\"138\">DateTimeOffset<\/td>\n<td style=\"width: 191.6%;\" width=\"339\">The date and time when the checklistItem was finished.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 22.4719%;\" width=\"139\">createdDateTime<\/td>\n<td style=\"width: 20.8631%;\" width=\"138\">DateTimeOffset<\/td>\n<td style=\"width: 191.6%;\" width=\"339\">The date and time when the checklistItem was created.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 22.4719%;\" width=\"139\">displayName<\/td>\n<td style=\"width: 20.8631%;\" width=\"138\">String<\/td>\n<td style=\"width: 191.6%;\" width=\"339\">Field indicating the title of checklistItem.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 22.4719%;\" width=\"139\">isChecked<\/td>\n<td style=\"width: 20.8631%;\" width=\"138\">Boolean<\/td>\n<td style=\"width: 191.6%;\" width=\"339\">State indicating whether the item is checked off or not.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h3>Examples<\/h3>\n<h4><strong>Retrieve checklistitems as part of Tasks resource<\/strong><\/h4>\n<pre class=\"prettyprint\">GET <span style=\"text-decoration: underline;\">https:\/\/graph.microsoft.com\/v1.0\/me\/todo\/lists\/&lt;list-id&gt;\/tasks\/&lt;task-id&gt;<\/span>\r\n\r\nHTTP\/1.1 200 OK\r\n        {\r\n            \"importance\": \"normal\",\r\n            \"isReminderOn\": false,\r\n            \"status\": \"notStarted\",\r\n            \"title\": \"Review Q1 marketing\",\r\n            \"createdDateTime\": \"2022-06-14T04:52:14.3497205Z\",\r\n            \"lastModifiedDateTime\": \"2022-06-14T04:54:37.3021207Z\",\r\n            \"categories\": [],\r\n            \"id\": \"AQMkADAwA==\",\r\n            \"body\": {\r\n                \"content\": \"\",\r\n                \"contentType\": \"text\"\r\n            },\r\n            \"checklistItems\": [\r\n                {\r\n                    \"displayName\": \"Review introduction\",\r\n                    \"createdDateTime\": \"2022-06-14T04:53:25.0246583Z\",\r\n                    \"isChecked\": false,\r\n                    \"id\": \"f341acf2-b3e2-45ae-883d-b6490d240735\"\r\n                },\r\n                {\r\n                    \"displayName\": \"Share with colleagues\",\r\n                    \"createdDateTime\": \"2022-06-14T04:54:27.7648563Z\",\r\n                    \"isChecked\": false,\r\n                    \"id\": \"9357655e-577b-41e7-ada4-8f90692b84ef\"\r\n                }\r\n            ]\r\n        }\r\n<\/pre>\n<h4><strong>Get a specified checklistItem <\/strong><\/h4>\n<pre class=\"prettyprint\">GET <span style=\"text-decoration: underline;\">https:\/\/graph.microsoft.com\/v1.0\/me\/todo\/lists\/&lt;list-id&gt;\/tasks\/&lt;task-id&gt;\/checklistItems\/&lt;checklistItem-id&gt;<\/span>\r\n\r\nHTTP\/1.1 200 OK\r\n                {\r\n                    \"displayName\": \"Review introduction\",\r\n                    \"createdDateTime\": \"2022-06-14T04:53:25.0246583Z\",\r\n                    \"isChecked\": false,\r\n                    \"id\": \"f341acf2-b3e2-45ae-883d-b6490d240735\"\r\n                }\r\n<\/pre>\n<h4><strong>Create a checklistItem<\/strong><\/h4>\n<pre class=\"prettyprint\">POST <span style=\"text-decoration: underline;\">https:\/\/graph.microsoft.com\/v1.0\/me\/todo\/lists\/&lt;list-id&gt;\/tasks\/&lt;task-id&gt;\/checklistItems<\/span>\r\n{\r\n     \"displayName\": \"Get feedback\",\r\n}\r\n\r\nHTTP\/1.1 201 Created\r\n{\r\n    \"displayName\": \"Get feedback\",\r\n    \"createdDateTime\": \"2022-06-14T05:07:45.6021029Z\",\r\n    \"isChecked\": false,\r\n    \"id\": \"c55af287-11ce-4db9-beff-f9427963f4a1\"\r\n}\r\n<\/pre>\n<p>For more information and examples, see the detailed documentation for <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/checklistitem?view=graph-rest-1.0\">checklistItems<\/a>.<\/p>\n<h2>StartDateTime<\/h2>\n<p>We are introducing a new property in beta, startDateTime, that shows the date in a specified time zone at which the task is scheduled to start. You can see this property while querying users To Do tasks.<\/p>\n<h3>Example<\/h3>\n<pre class=\"prettyprint\">GET <span style=\"text-decoration: underline;\">https:\/\/graph.microsoft.com\/beta\/me\/todo\/lists\/&lt;list-id&gt;\/tasks\/&lt;task-id&gt;<\/span>\r\nHTTP\/1.1 200 OK\r\n        {\r\n            \"importance\": \"high\",\r\n            \"isReminderOn\": false,\r\n            \"status\": \"completed\",\r\n            \"title\": \"Review Q1 marketing\",\r\n            \"createdDateTime\": \"2022-04-28T12:18:39.2889451Z\",\r\n            \"lastModifiedDateTime\": \"2022-06-01T04:22:16.0704279Z\",\r\n            \"categories\": [\r\n                \"Planning\",\r\n                \"Urgent\"\r\n],\r\n     \"startDateTime\": { \r\n  \"dateTime\": \"2012-07-23T07:00:00.0000000\", \r\n  \"timeZone\": \"UTC\" \r\n      }, \r\n            \"id\": \"AAMj1YgAGEuIMbwAAAA==\",\r\n            \"body\": {\r\n                \"content\": \"\",\r\n                \"contentType\": \"text\"\r\n            }\r\n            }\r\n<\/pre>\n<h2>Retirement of Tasks (preview) APIs at me\/tasks<\/h2>\n<p>The to-do API set built on <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/tasks-overview?view=graph-rest-beta\">baseTask<\/a> was retired on May 31, 2022 and will stop returning data on <strong>August 31, 2022<\/strong>. We made this change to bring clarity for developers around which APIs to use to access users\u2019 tasks.<\/p>\n<h3><strong>What do I need to do?<\/strong><\/h3>\n<p>If you\u2019re testing or building an application with any of the below resource, please plan to use the recommended resources from <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/todo-overview?view=graph-rest-beta\">To Do tasks API<\/a>.<\/p>\n<table style=\"width: 90.096%;\">\n<tbody>\n<tr>\n<td style=\"width: 52.1306%;\" width=\"308\"><strong>Deprecated resources<\/strong><\/td>\n<td style=\"width: 146.415%;\" width=\"308\"><strong>Recommended resource<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 52.1306%;\" width=\"308\"><a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/basetasklist?view=graph-rest-beta\">baseTaskList<\/a><strong>, <\/strong><a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/tasklist?view=graph-rest-beta\">taskList<\/a><strong>, <\/strong><a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/wellknowntasklist?view=graph-rest-beta\">wellKnownTaskList<\/a><\/td>\n<td style=\"width: 146.415%;\" width=\"308\"><a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/todotasklist?view=graph-rest-beta\">todoTaskList<\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 52.1306%;\" width=\"308\"><a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/basetask?view=graph-rest-beta\">baseTask<\/a>, <a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/task?view=graph-rest-beta\">task<\/a><\/td>\n<td style=\"width: 146.415%;\" width=\"308\"><a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/todotask?view=graph-rest-beta\">todoTask <\/a><\/td>\n<\/tr>\n<tr>\n<td style=\"width: 52.1306%;\" width=\"308\"><a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/linkedresource_v2?view=graph-rest-beta\">linkedResource_v2<\/a><\/td>\n<td style=\"width: 146.415%;\" width=\"308\"><a href=\"https:\/\/docs.microsoft.com\/graph\/api\/resources\/linkedresource?view=graph-rest-beta\">linkedResource<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>\u00a0<\/strong><\/p>\n<p>Thank you for\u00a0continuing\u00a0with us on our journey as we continue to improve productivity for everyone. If you have any feedback, suggestions or question, <a href=\"mailto:todofeedback@microsoft.com\">email us<\/a> or\u00a0let us know on our <a href=\"https:\/\/techcommunity.microsoft.com\/t5\/microsoft-365-developer-platform\/idb-p\/Microsoft365DeveloperPlatform\/label-name\/Microsoft%20Graph\">feedback<\/a> page.<\/p>\n<p>Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn about the new features in To Do tasks API and the retirement of the Tasks (Beta) API in Microsoft Graph.<\/p>\n","protected":false},"author":69077,"featured_media":6844,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[3],"tags":[12,156],"class_list":["post-11025","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-graph","tag-outlook","tag-to-do-api"],"acf":[],"blog_post_summary":"<p>Learn about the new features in To Do tasks API and the retirement of the Tasks (Beta) API in Microsoft Graph.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/11025","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/users\/69077"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/comments?post=11025"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/posts\/11025\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media\/6844"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/media?parent=11025"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/categories?post=11025"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/microsoft365dev\/wp-json\/wp\/v2\/tags?post=11025"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}