Skip to content

Commit 9256bfd

Browse files
authored
Merge pull request #26008 from microsoftgraph/user/danlucui/add_teams_channel_container_type
add teamsChannel to plannerPlanContainer
2 parents 4455e67 + 27cbc42 commit 9256bfd

File tree

5 files changed

+56
-8
lines changed

5 files changed

+56
-8
lines changed

api-reference/beta/resources/enums.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3423,6 +3423,7 @@ Possible values for user account types (group membership), per Windows definitio
34233423
| project |
34243424
| driveItem |
34253425
| user |
3426+
| teamsChannel|
34263427

34273428
### plannerPlanContextType values
34283429

api-reference/beta/resources/planner-overview.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ You can use the Planner API in Microsoft Graph to create tasks and assign them t
1717
Before you get started with the Planner API, it's helpful to understand how the main objects relate to each other and to Microsoft 365 groups.
1818

1919
## Plan containers
20-
In Microsoft Planner, plans are always contained in another resource. The containing resource, [plannerPlanContainer](plannerplancontainer.md), determines the authorization rules of the plan and all the tasks in it, and the lifecycle of the plan. You can create a plan in a container of one of the following types: [driveItem](driveitem.md), Microsoft 365 [group](group.md), Planner project, [roster](plannerroster.md), or [user](user.md).
20+
In Microsoft Planner, plans are always contained in another resource. The containing resource, [plannerPlanContainer](plannerplancontainer.md), determines the authorization rules of the plan and all the tasks in it, and the lifecycle of the plan. You can create a plan in a container of one of the following types: [driveItem](driveitem.md), Microsoft 365 [group](group.md), Planner project, [roster](plannerroster.md), [teamsChannel](channel.md), or [user](user.md).
2121

2222
The most common type of container is a group.
2323

@@ -35,8 +35,32 @@ GET /groups/{group-id}/planner/plans
3535

3636
When you [create a new plan](../api/planner-post-plans.md), set the **container** property on a plan object to make a group its container. Plans must be contained by a supported resource.
3737

38-
>**Note:** 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](../api/group-post-groups.md), 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](../api/group-post-members.md).
38+
>**Note:** The user who creates the plan must be a member of the group that contains the plan. When you create a new group by using [Create group](../api/group-post-groups.md), you aren't added to the group as a member. After the group is created, add yourself as a member by using [group post members](../api/group-post-members.md).
3939
40+
### Container type: Teams channel
41+
42+
The `teamsChannel` container type supports plans created in shared channels in Teams, where the channel is the container for the plan. Plans that are pinned in shared channels are deleted when the channel is deleted.
43+
44+
To [create a new plan](../api/planner-post-plans.md) in the container of a Teams channel, set the **container** property on a [plan](plannerplan.md) object with **type** as `teamsChannel`, and the ID should be formatted as "{team-id}/channels/{channel-id}".
45+
46+
```json
47+
{
48+
"container": {
49+
"id": "{team-id}/channels/{channel-id}",
50+
"type": "teamsChannel"
51+
}
52+
}
53+
```
54+
55+
Alternatively, you can specify the URL for a shared channel in Teams.
56+
57+
```json
58+
{
59+
"container": {
60+
"url": "https://graph.microsoft.com/beta/teams/{team-id}/channels/{channel-id}"
61+
}
62+
}
63+
```
4064

4165
### Container type: User
4266

api-reference/beta/resources/plannerplancontainer.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,25 @@ Planner currently supports the container types listed in the following table. Wh
2020

2121
|Type|Description|Path to the resource|
2222
|----|-----------|--------------------|
23+
|driveItem| Plan is contained by a [driveItem](driveitem.md). | `https://graph.microsoft.com/beta/drives/<driveId>/items/<itemId>`|
2324
|group| Plan is contained by a [group](group.md).| `https://graph.microsoft.com/beta/groups/<id>` |
24-
|roster| Plan is contained by a [plannerRoster](plannerroster.md). | `https://graph.microsoft.com/beta/planner/rosters/<id>` |
2525
|project| Plan is contained by a Project from [Microsoft Project for the web](/project-for-the-web/projectforweb-admin-home). | Microsoft Project currently doesn't have a resource path on Microsoft Graph. Project details and members can be managed from [Microsoft Project](https://project.microsoft.com). |
26-
|driveItem| Plan is contained by a [driveItem](driveitem.md). | `https://graph.microsoft.com/beta/drives/<driveId>/items/<itemId>`|
26+
|roster| Plan is contained by a [plannerRoster](plannerroster.md). | `https://graph.microsoft.com/beta/planner/rosters/<id>` |
27+
|teamsChannel| Plan is contained by a Teams [channel](channel.md). | `https://graph.microsoft.com/beta/teams/<teamId>/channels/<channelId>` |
2728
|user| Plan is contained by a [User](user.md) | `https://graph.microsoft.com/beta/users/<id>` |
2829

2930
## Properties
3031
|Property|Type|Description|
3132
|:---|:---|:---|
3233
|containerId|String|The identifier of the resource that contains the plan. Optional.|
33-
|type|plannerContainerType|The type of the resource that contains the plan. For supported types, see the previous table. Possible values are: `group`, `unknownFutureValue`, `roster`, `project`, `driveItem`, and `user`. You must use the `Prefer: include-unknown-enum-members` request header to get the following value in this [evolvable enum](/graph/best-practices-concept#handling-future-members-in-evolvable-enumerations): `roster`, `project`, `driveItem`, and `user`. Optional.|
34+
|type|plannerContainerType|The type of the resource that contains the plan. For supported types, see the previous table. Possible values are: `group`, `unknownFutureValue`, `roster`, `project`, `driveItem`, `user`, and `teamsChannel` . You must use the `Prefer: include-unknown-enum-members` request header to get the following value in this [evolvable enum](/graph/best-practices-concept#handling-future-members-in-evolvable-enumerations): `roster`, `project`, `driveItem`,`user`, and,`teamsChannel`. Optional.|
3435
|url|String|The full canonical URL of the container. Optional.|
3536

3637
## Relationships
3738
None.
3839

3940
## JSON representation
40-
The following example displays a JSON representation of a plan container.
41+
The following JSON representation shows the resource type.
4142

4243
<!-- {
4344
"blockType": "resource",
@@ -47,9 +48,9 @@ The following example displays a JSON representation of a plan container.
4748
``` json
4849
{
4950
"@odata.type": "#microsoft.graph.plannerPlanContainer",
50-
"url": "String",
5151
"containerId": "String",
52-
"type": "String"
52+
"type": "String",
53+
"url": "String"
5354
}
5455
```
5556

changelog/Microsoft.Tasks.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,23 @@
11
{
22
"changelog": [
3+
{
4+
"ChangeList": [
5+
{
6+
"Id": "ac461ffd-f78b-4889-a030-1477634802db",
7+
"ApiChange": "Member",
8+
"ChangedApiName": "teamsChannel",
9+
"ChangeType": "Addition",
10+
"Description": "Added the `teamsChannel` member to the **plannerContainerType** enumeration.",
11+
"Target": "plannerContainerType"
12+
}
13+
],
14+
"Id": "ac461ffd-f78b-4889-a030-1477634802db",
15+
"Cloud": "Prod",
16+
"Version": "beta",
17+
"CreatedDateTime": "2025-01-12T20:25:44.9502669Z",
18+
"WorkloadArea": "Tasks and plans",
19+
"SubArea": ""
20+
},
321
{
422
"ChangeList": [
523
{

concepts/whats-new-overview.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ The functionality also allows you to configure the default fallback option when
4242

4343
Use the [start](/graph/api/industrydata-industrydatarun-start?view=graph-rest-beta&preserve-view=true) operation on the [industryDataRun](/graph/api/resources/industrydata-industrydatarun?view=graph-rest-beta&preserve-view=true) resource to perform an on-demand run, with throttling limits of up to five successful runs every 12 hours.
4444

45+
### Tasks and plans
46+
47+
Use the [teamsChannel](/graph/api/resources/planner-overview?view=graph-rest-beta&preserve-view=true#container-type-teams-channel) container type to create plans in shared channels in Microsoft Teams.
48+
4549
## December 2024: New and generally available
4650

4751
### Reports

0 commit comments

Comments
 (0)