There are a few additional properties available to the todoTask lately so let's include them in our command todo task set Graph - todoTask properties
Options to add
| Option |
Description |
--categories [categories] |
Comma-separated list of categories associated with the task. |
--completedDateTime [completedDateTime] |
The date and time when the task was finished. This should be defined as a valid ISO 8601 string. 2021-12-16T18:28:48.6964197Z |
--startDateTime [startDateTime] |
The date and time when the task is scheduled to start. This should be defined as a valid ISO 8601 string. 2021-12-16T18:28:48.6964197Z |
Additional examples
Update a task to Microsoft To Do with several categories
m365 todo task set --title "New task" --listName "My task list" --categories "Red category,Important"
Update a task to Microsoft To Do with a start date and set a reminder for the task
m365 todo task set --title "New task" --listName "My task list" --startDateTime "2023-12-16T18:28:48.6964197Z" --isReminderOn true
Remarks
When you specify the values for categories, consider the following. Each category can correspond to the displayName property of an outlookCategory that the user has defined. It is permissible to use distinct names. To remove all assigned categories you can provide an empty string as value.
There are a few additional properties available to the
todoTasklately so let's include them in our commandtodo task setGraph - todoTask propertiesOptions to add
--categories [categories]--completedDateTime [completedDateTime]2021-12-16T18:28:48.6964197Z--startDateTime [startDateTime]2021-12-16T18:28:48.6964197ZAdditional examples
Update a task to Microsoft To Do with several categories
Update a task to Microsoft To Do with a start date and set a reminder for the task
Remarks
When you specify the values for
categories, consider the following. Each category can correspond to the displayName property of an outlookCategory that the user has defined. It is permissible to use distinct names. To remove all assigned categories you can provide an empty string as value.