POST https://graph.microsoft.com/beta/planner/rosters
Content-Type: application/json
{
"@odata.type": "#microsoft.graph.plannerRoster"
}
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new PlannerRoster
{
OdataType = "#microsoft.graph.plannerRoster",
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Planner.Rosters.PostAsync(requestBody);
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
PlannerRoster plannerRoster = new PlannerRoster();
plannerRoster.setOdataType("#microsoft.graph.plannerRoster");
PlannerRoster result = graphClient.planner().rosters().post(plannerRoster);
<?php
use Microsoft\Graph\GraphServiceClient;
use Microsoft\Graph\Generated\Models\PlannerRoster;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new PlannerRoster();
$requestBody->setOdataType('#microsoft.graph.plannerRoster');
$result = $graphServiceClient->planner()->rosters()->post($requestBody)->wait();