Les API sous la version /beta dans Microsoft Graph sont susceptibles d’être modifiées. L’utilisation de ces API dans des applications de production n’est pas prise en charge. Pour déterminer si une API est disponible dans v1.0, utilisez le sélecteur Version .
Obtenez des informations sur le plannerPlan mappé à une cible donnée. Si un plan plannerPlan n’existe pas pour la cible spécifiée au moment de la demande, un plan est créé pour businessScenario.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Solutions.BusinessScenarios.Item.Planner.GetPlan;
using Microsoft.Graph.Beta.Models;
var requestBody = new GetPlanPostRequestBody
{
Target = new BusinessScenarioGroupTarget
{
OdataType = "microsoft.graph.businessScenarioGroupTarget",
TaskTargetKind = PlannerTaskTargetKind.Group,
GroupId = "7a339254-4b2b-4410-b295-c890a16776ee",
},
};
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=csharp
var result = await graphClient.Solutions.BusinessScenarios["{businessScenario-id}"].Planner.GetPlan.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"
graphsolutions "github.com/microsoftgraph/msgraph-beta-sdk-go/solutions"
graphmodels "github.com/microsoftgraph/msgraph-beta-sdk-go/models"
//other-imports
)
requestBody := graphsolutions.NewGetPlanPostRequestBody()
target := graphmodels.NewBusinessScenarioGroupTarget()
taskTargetKind := graphmodels.GROUP_PLANNERTASKTARGETKIND
target.SetTaskTargetKind(&taskTargetKind)
groupId := "7a339254-4b2b-4410-b295-c890a16776ee"
target.SetGroupId(&groupId)
requestBody.SetTarget(target)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
getPlan, err := graphClient.Solutions().BusinessScenarios().ByBusinessScenarioId("businessScenario-id").Planner().GetPlan().Post(context.Background(), requestBody, nil)
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
com.microsoft.graph.beta.solutions.businessscenarios.item.planner.getplan.GetPlanPostRequestBody getPlanPostRequestBody = new com.microsoft.graph.beta.solutions.businessscenarios.item.planner.getplan.GetPlanPostRequestBody();
BusinessScenarioGroupTarget target = new BusinessScenarioGroupTarget();
target.setOdataType("microsoft.graph.businessScenarioGroupTarget");
target.setTaskTargetKind(PlannerTaskTargetKind.Group);
target.setGroupId("7a339254-4b2b-4410-b295-c890a16776ee");
getPlanPostRequestBody.setTarget(target);
var result = graphClient.solutions().businessScenarios().byBusinessScenarioId("{businessScenario-id}").planner().getPlan().post(getPlanPostRequestBody);
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Solutions\BusinessScenarios\Item\Planner\GetPlan\GetPlanPostRequestBody;
use Microsoft\Graph\Beta\Generated\Models\BusinessScenarioGroupTarget;
use Microsoft\Graph\Beta\Generated\Models\PlannerTaskTargetKind;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new GetPlanPostRequestBody();
$target = new BusinessScenarioGroupTarget();
$target->setOdataType('microsoft.graph.businessScenarioGroupTarget');
$target->setTaskTargetKind(new PlannerTaskTargetKind('group'));
$target->setGroupId('7a339254-4b2b-4410-b295-c890a16776ee');
$requestBody->setTarget($target);
$result = $graphServiceClient->solutions()->businessScenarios()->byBusinessScenarioId('businessScenario-id')->planner()->getPlan()->post($requestBody)->wait();
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.solutions.businessscenarios.item.planner.get_plan.get_plan_post_request_body import GetPlanPostRequestBody
from msgraph_beta.generated.models.business_scenario_group_target import BusinessScenarioGroupTarget
from msgraph_beta.generated.models.planner_task_target_kind import PlannerTaskTargetKind
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = GetPlanPostRequestBody(
target = BusinessScenarioGroupTarget(
odata_type = "microsoft.graph.businessScenarioGroupTarget",
task_target_kind = PlannerTaskTargetKind.Group,
group_id = "7a339254-4b2b-4410-b295-c890a16776ee",
),
)
result = await graph_client.solutions.business_scenarios.by_business_scenario_id('businessScenario-id').planner.get_plan.post(request_body)