POST https://graph.microsoft.com/v1.0/me/todo/lists
Content-Type: application/json
{
"displayName": "Travel items"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Models;
var requestBody = new TodoTaskList
{
DisplayName = "Travel items",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Me.Todo.Lists.PostAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW VERSION OF THE SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new TodoTaskList();
$requestBody->setDisplayName('Travel items');
$result = $graphServiceClient->me()->todo()->lists()->post($requestBody)->wait();
Import-Module Microsoft.Graph.Users
$params = @{
displayName = "Travel items"
}
# A UPN can also be used as -UserId.
New-MgUserTodoList -UserId $userId -BodyParameter $params
# THE PYTHON SDK IS IN PREVIEW. FOR NON-PRODUCTION USE ONLY
graph_client = GraphServiceClient(credentials, scopes)
request_body = TodoTaskList(
display_name = "Travel items",
)
result = await graph_client.me.todo.lists.post(request_body)