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 major version. Current major version is $v0.*
// Dependencies
import (
"context"
msgraphsdk "github.com/microsoftgraph/msgraph-beta-sdk-go"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphmodels.NewPlannerRoster()
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
rosters, err := graphClient.Planner().Rosters().Post(context.Background(), requestBody, nil)
// 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\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\PlannerRoster;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new PlannerRoster();
$requestBody->setOdataType('#microsoft.graph.plannerRoster');
$result = $graphServiceClient->planner()->rosters()->post($requestBody)->wait();