APIs under the /beta version in Microsoft Graph are subject to change. Use of these APIs in production applications is not supported. To determine whether an API is available in v1.0, use the Version selector.
Choose the permission or permissions marked as least privileged for this API. Use a higher privileged permission or permissions only if your app requires it. For details about delegated and application permissions, see Permission types. To learn more about these permissions, see the permissions reference.
Permission type
Least privileged permissions
Higher privileged permissions
Delegated (work or school account)
BusinessScenarioData.ReadWrite.OwnedBy
Not available.
Delegated (personal Microsoft account)
Not supported.
Not supported.
Application
BusinessScenarioData.ReadWrite.OwnedBy
Not available.
HTTP request
POST /solutions/businessScenarios/{businessScenarioId}/planner/tasks
The set of assignees the task is assigned to. Inherited from plannerTask.
bucketId
String
Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It's 28 characters long and case-sensitive. The format validation is done on the service. Inherited from plannerTask.
Scenario-specific properties of the task. externalObjectId and externalBucketId properties must be specified when creating a task. Required.
conversationThreadId
String
Thread ID of the conversation on the task. This ID references the conversation thread object created in the group. Inherited from plannerTask.
dueDateTime
DateTimeOffset
Date and time at which the task is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Inherited from plannerTask.
Percentage of task completion. When set to 100, the task is considered completed. Inherited from plannerTask.
planId
String
Identifier of the plan to which the task belongs. Inherited from plannerTask.
priority
Int32
Priority of the task. Valid range of values is between 0 and 10 (inclusive), with increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as "urgent"; 2, 3, and 4 as "important"; 5, 6, and 7 as "medium"; and 8, 9, and 10 as "low". Currently, Planner sets the value 1 for "urgent", 3 for "important", 5 for "medium", and 9 for "low". Inherited from plannerTask.
startDateTime
DateTimeOffset
Date and time at which the task starts. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Inherited from plannerTask.
// Code snippets are only available for the latest version. Current version is 5.x
// Dependencies
using Microsoft.Graph.Beta.Models;
var requestBody = new BusinessScenarioTask
{
Title = "Customer order #12010",
PercentComplete = 0,
Priority = 5,
Target = new BusinessScenarioGroupTarget
{
OdataType = "microsoft.graph.businessScenarioGroupTarget",
TaskTargetKind = PlannerTaskTargetKind.Group,
GroupId = "7a339254-4b2b-4410-b295-c890a16776ee",
},
BusinessScenarioProperties = new BusinessScenarioProperties
{
ExternalObjectId = "Order#12010",
ExternalContextId = "Warehouse-CA-36",
ExternalObjectVersion = "000001",
WebUrl = "https://ordertracking.contoso.com/view?id=12010",
ExternalBucketId = "deliveryBucket",
},
};
// 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.Tasks.PostAsync(requestBody);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// 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.NewBusinessScenarioTask()
title := "Customer order #12010"
requestBody.SetTitle(&title)
percentComplete := int32(0)
requestBody.SetPercentComplete(&percentComplete)
priority := int32(5)
requestBody.SetPriority(&priority)
target := graphmodels.NewBusinessScenarioGroupTarget()
taskTargetKind := graphmodels.GROUP_PLANNERTASKTARGETKIND
target.SetTaskTargetKind(&taskTargetKind)
groupId := "7a339254-4b2b-4410-b295-c890a16776ee"
target.SetGroupId(&groupId)
requestBody.SetTarget(target)
businessScenarioProperties := graphmodels.NewBusinessScenarioProperties()
externalObjectId := "Order#12010"
businessScenarioProperties.SetExternalObjectId(&externalObjectId)
externalContextId := "Warehouse-CA-36"
businessScenarioProperties.SetExternalContextId(&externalContextId)
externalObjectVersion := "000001"
businessScenarioProperties.SetExternalObjectVersion(&externalObjectVersion)
webUrl := "https://ordertracking.contoso.com/view?id=12010"
businessScenarioProperties.SetWebUrl(&webUrl)
externalBucketId := "deliveryBucket"
businessScenarioProperties.SetExternalBucketId(&externalBucketId)
requestBody.SetBusinessScenarioProperties(businessScenarioProperties)
// To initialize your graphClient, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=go
tasks, err := graphClient.Solutions().BusinessScenarios().ByBusinessScenarioId("businessScenario-id").Planner().Tasks().Post(context.Background(), requestBody, nil)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
// Code snippets are only available for the latest version. Current version is 6.x
GraphServiceClient graphClient = new GraphServiceClient(requestAdapter);
BusinessScenarioTask businessScenarioTask = new BusinessScenarioTask();
businessScenarioTask.setTitle("Customer order #12010");
businessScenarioTask.setPercentComplete(0);
businessScenarioTask.setPriority(5);
BusinessScenarioGroupTarget target = new BusinessScenarioGroupTarget();
target.setOdataType("microsoft.graph.businessScenarioGroupTarget");
target.setTaskTargetKind(PlannerTaskTargetKind.Group);
target.setGroupId("7a339254-4b2b-4410-b295-c890a16776ee");
businessScenarioTask.setTarget(target);
BusinessScenarioProperties businessScenarioProperties = new BusinessScenarioProperties();
businessScenarioProperties.setExternalObjectId("Order#12010");
businessScenarioProperties.setExternalContextId("Warehouse-CA-36");
businessScenarioProperties.setExternalObjectVersion("000001");
businessScenarioProperties.setWebUrl("https://ordertracking.contoso.com/view?id=12010");
businessScenarioProperties.setExternalBucketId("deliveryBucket");
businessScenarioTask.setBusinessScenarioProperties(businessScenarioProperties);
BusinessScenarioTask result = graphClient.solutions().businessScenarios().byBusinessScenarioId("{businessScenario-id}").planner().tasks().post(businessScenarioTask);
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
<?php
use Microsoft\Graph\Beta\GraphServiceClient;
use Microsoft\Graph\Beta\Generated\Models\BusinessScenarioTask;
use Microsoft\Graph\Beta\Generated\Models\BusinessScenarioGroupTarget;
use Microsoft\Graph\Beta\Generated\Models\PlannerTaskTargetKind;
use Microsoft\Graph\Beta\Generated\Models\BusinessScenarioProperties;
$graphServiceClient = new GraphServiceClient($tokenRequestContext, $scopes);
$requestBody = new BusinessScenarioTask();
$requestBody->setTitle('Customer order #12010');
$requestBody->setPercentComplete(0);
$requestBody->setPriority(5);
$target = new BusinessScenarioGroupTarget();
$target->setOdataType('microsoft.graph.businessScenarioGroupTarget');
$target->setTaskTargetKind(new PlannerTaskTargetKind('group'));
$target->setGroupId('7a339254-4b2b-4410-b295-c890a16776ee');
$requestBody->setTarget($target);
$businessScenarioProperties = new BusinessScenarioProperties();
$businessScenarioProperties->setExternalObjectId('Order#12010');
$businessScenarioProperties->setExternalContextId('Warehouse-CA-36');
$businessScenarioProperties->setExternalObjectVersion('000001');
$businessScenarioProperties->setWebUrl('https://ordertracking.contoso.com/view?id=12010');
$businessScenarioProperties->setExternalBucketId('deliveryBucket');
$requestBody->setBusinessScenarioProperties($businessScenarioProperties);
$result = $graphServiceClient->solutions()->businessScenarios()->byBusinessScenarioId('businessScenario-id')->planner()->tasks()->post($requestBody)->wait();
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.
# Code snippets are only available for the latest version. Current version is 1.x
from msgraph_beta import GraphServiceClient
from msgraph_beta.generated.models.business_scenario_task import BusinessScenarioTask
from msgraph_beta.generated.models.business_scenario_group_target import BusinessScenarioGroupTarget
from msgraph_beta.generated.models.planner_task_target_kind import PlannerTaskTargetKind
from msgraph_beta.generated.models.business_scenario_properties import BusinessScenarioProperties
# To initialize your graph_client, see https://learn.microsoft.com/en-us/graph/sdks/create-client?from=snippets&tabs=python
request_body = BusinessScenarioTask(
title = "Customer order #12010",
percent_complete = 0,
priority = 5,
target = BusinessScenarioGroupTarget(
odata_type = "microsoft.graph.businessScenarioGroupTarget",
task_target_kind = PlannerTaskTargetKind.Group,
group_id = "7a339254-4b2b-4410-b295-c890a16776ee",
),
business_scenario_properties = BusinessScenarioProperties(
external_object_id = "Order#12010",
external_context_id = "Warehouse-CA-36",
external_object_version = "000001",
web_url = "https://ordertracking.contoso.com/view?id=12010",
external_bucket_id = "deliveryBucket",
),
)
result = await graph_client.solutions.business_scenarios.by_business_scenario_id('businessScenario-id').planner.tasks.post(request_body)
Important
Microsoft Graph SDKs use the v1.0 version of the API by default, and do not support all the types, properties, and APIs available in the beta version. For details about accessing the beta API with the SDK, see Use the Microsoft Graph SDKs with the beta API.