Identifies the container of the plan. Specify only the url, the containerId and type, or all properties. After it is set, this property can’t be updated.
title
String
The title of the plan.
Note: If the container is a Microsoft 365 group, the user who is creating the plan must be a member of the group that will contain the plan. When you create a new group by using Create group, you are not added to the group as a member. After the group is created, add yourself as a member by using group post members.
Response
If successful, this method returns a 201 Created response code and a plannerPlan object in the response body.
This method can return any of the HTTP status codes. The most common errors that apps should handle for this method are the 400, 403, and 404 responses. For more information about these errors, see Common Planner error conditions.
var graphClient = new GraphServiceClient(requestAdapter);
var requestBody = new PlannerPlan
{
Container = new PlannerPlanContainer
{
Url = "https://graph.microsoft.com/beta/groups/ebf3b108-5234-4e22-b93d-656d7dae5874",
},
Title = "title-value",
};
var result = await graphClient.Planner.Plans.PostAsync(requestBody);
<?php
// THIS SNIPPET IS A PREVIEW FOR THE KIOTA BASED SDK. NON-PRODUCTION USE ONLY
$graphServiceClient = new GraphServiceClient($requestAdapter);
$requestBody = new PlannerPlan();
$container = new PlannerPlanContainer();
$container->setUrl('https://graph.microsoft.com/beta/groups/ebf3b108-5234-4e22-b93d-656d7dae5874');
$requestBody->setContainer($container);
$requestBody->setTitle('title-value');
$requestResult = $graphServiceClient->planner()->plans()->post($requestBody);