You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Document error responses and reserved names for section management APIs
- Add error response tables to create, update, delete, add-item, and move-item APIs covering 400/403/404/409/412/428.
- Document the 409 Conflict "A section with this display name already exists." case and note that display name comparison is case-sensitive.
- Document the reserved system-defined section names (RecentChats, QuickViews, TeamsAndChannels, MutedChats, MeetingChats, EngageCommunities) in the teamworkSection resource and the create/update property tables.
- Fix the create-section request example to stop setting the read-only displayIcon.displayName property.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: api-reference/beta/api/teamworksection-delete.md
+9Lines changed: 9 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,6 +47,15 @@ Don't supply a request body for this method.
47
47
48
48
If successful, this method returns a `204 No Content` response code. It doesn't return anything in the response body.
49
49
50
+
The following errors are possible.
51
+
52
+
| Response code | Message |
53
+
|:---|:---|
54
+
|`403 Forbidden`| This section is system-generated and cannot be modified. System-defined sections can't be deleted. |
55
+
|`404 Not Found`| The specified section was not found. |
56
+
|`412 Precondition Failed`| The `If-Match` header value doesn't match the current section hierarchy version. [List sections](userteamwork-list-sections.md) again to retrieve the current **@microsoft.graph.sectionsVersion** annotation and retry. |
57
+
|`428 Precondition Required`| The `If-Match` header is required for this operation. |
Copy file name to clipboardExpand all lines: api-reference/beta/api/teamworksection-post-items.md
+13-9Lines changed: 13 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,15 +57,19 @@ If successful, this method returns a `201 Created` response code and a [teamwork
57
57
> [!NOTE]
58
58
> The response includes an updated **@odata.etag** value. Use this value as the `If-Match` header for any subsequent mutation operations.
59
59
60
-
This method can also return the following errors.
61
-
62
-
| Scenario | HTTP code | Error code | Message |
63
-
|:---------|:----------|:-----------|:--------|
64
-
| Item already exists in this section |`409 Conflict`|`conflict`| This item is already in this section. |
65
-
| Item already exists in another user-defined section |`409 Conflict`|`conflict`| This item is already associated with another section. Use the [move](teamworksectionitem-move.md) API to relocate it. |
66
-
| Maximum items per section reached |`400 Bad Request`|`badRequest`| The maximum number of items in this section is reached. |
67
-
| Invalid item ID |`400 Bad Request`|`badRequest`| The specified item ID isn't valid. Provide a valid chat, channel, meeting, or community ID. |
68
-
| ETag version mismatch |`412 Precondition Failed`|`preconditionFailed`| The resource was modified after it was last read. Read the latest version and retry. |
60
+
The following errors are possible.
61
+
62
+
| Response code | Message |
63
+
|:---|:---|
64
+
|`400 Bad Request`| The 'id' property is required and must not be empty. |
65
+
|`400 Bad Request`| The specified item ID is not valid. Provide a valid chat, channel, meeting, or community ID. |
66
+
|`400 Bad Request`| The maximum number of items in this section has been reached. |
67
+
|`403 Forbidden`| Access to this resource is denied. The caller must be a member of the conversation being added. |
68
+
|`404 Not Found`| The specified section was not found. |
69
+
|`409 Conflict`| This item is already in this section. |
70
+
|`409 Conflict`| This item is already associated with another section. Use the [move](teamworksectionitem-move.md) API to relocate it. The response includes a `conflictingSectionId` detail with the ID of the section that currently holds the item. |
71
+
|`412 Precondition Failed`| The `If-Match` header value doesn't match the current section hierarchy version. [List sections](userteamwork-list-sections.md) again to retrieve the current **@microsoft.graph.sectionsVersion** annotation and retry. |
72
+
|`428 Precondition Required`| The `If-Match` header is required for this operation. |
Copy file name to clipboardExpand all lines: api-reference/beta/api/teamworksection-update.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ In the request body, supply a JSON representation of only the properties to upda
47
47
| Property | Type | Description |
48
48
|:---------|:-----|:------------|
49
49
| displayIcon |[sectionDisplayIcon](../resources/sectiondisplayicon.md)| The icon displayed for the section. |
50
-
| displayName | String | The display name of the section. Maximum length is 50 characters. |
50
+
| displayName | String | The display name of the section. Maximum length is 50 characters. Display names are case-sensitive and must be unique within a user's sections. The reserved system-defined names (`RecentChats`, `QuickViews`, `TeamsAndChannels`, `MutedChats`, `MeetingChats`, `EngageCommunities`) can't be used. |
51
51
| isExpanded | Boolean | Indicates whether the section is expanded in the user interface. |
52
52
| sortType | sectionSortType | The sort order of items in the section. The possible values are: `mostRecent`, `unreadThenMostRecent`, `nameAlphabetical`, `userDefinedCustomOrder`, `unknownFutureValue`. |
53
53
@@ -64,7 +64,19 @@ If successful, this method returns a `200 OK` response code and an updated [team
64
64
> [!NOTE]
65
65
> The response includes an updated **@odata.etag** value. Use this value as the `If-Match` header for any subsequent mutation operations.
66
66
67
-
If the request specifies an unsupported **sortType** for the section type, this method returns a `400 Bad Request` response code. For more information, see the [Request body](#request-body) section.
67
+
The following errors are possible.
68
+
69
+
| Response code | Message |
70
+
|:---|:---|
71
+
|`400 Bad Request`| At least one property must be provided for update. |
72
+
|`400 Bad Request`| The 'displayName' property must not be empty or whitespace, or must not exceed 50 characters. |
73
+
|`400 Bad Request`| The property '{propertyName}' is read-only or not updatable. Only **displayName**, **displayIcon**, **isExpanded**, and **sortType** can be updated. |
74
+
|`400 Bad Request`| The specified sort type is not valid for this section. For more information, see the [Request body](#request-body) section. |
75
+
|`403 Forbidden`| This section is system-generated and cannot be modified. Only the **sortType** property can be updated on system-defined sections. |
76
+
|`404 Not Found`| The specified section was not found. |
77
+
|`409 Conflict`| A section with this display name already exists. Returned when the requested **displayName** matches an existing user-defined section or a reserved system-defined section name. The comparison is case-sensitive. |
78
+
|`412 Precondition Failed`| The `If-Match` header value doesn't match the current section hierarchy version. [List sections](userteamwork-list-sections.md) again to retrieve the current **@microsoft.graph.sectionsVersion** annotation and retry. |
79
+
|`428 Precondition Required`| The `If-Match` header is required for this operation. |
Copy file name to clipboardExpand all lines: api-reference/beta/api/teamworksectionitem-move.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -57,6 +57,17 @@ If successful, this action returns a `200 OK` response code and a [teamworkSecti
57
57
> [!NOTE]
58
58
> The response includes an updated **@odata.etag** value. Use this value as the `If-Match` header for any subsequent mutation operations.
59
59
60
+
The following errors are possible.
61
+
62
+
| Response code | Message |
63
+
|:---|:---|
64
+
|`400 Bad Request`| The 'targetSectionId' property is required and must not be empty. |
65
+
|`400 Bad Request`| The source and target sections must be different. |
66
+
|`403 Forbidden`| This section is system-generated and cannot be modified. Items can't be moved into or out of system-defined sections by using this action. |
67
+
|`404 Not Found`| The specified section was not found, or the specified item was not found in this section. |
68
+
|`412 Precondition Failed`| The `If-Match` header value doesn't match the current section hierarchy version. [List sections](userteamwork-list-sections.md) again to retrieve the current **@microsoft.graph.sectionsVersion** annotation and retry. |
69
+
|`428 Precondition Required`| The `If-Match` header is required for this operation. |
Copy file name to clipboardExpand all lines: api-reference/beta/api/userteamwork-post-sections.md
+16-3Lines changed: 16 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ The following table lists the properties that you can set when you create a **te
49
49
| Property | Type | Description |
50
50
|:---------|:-----|:------------|
51
51
| displayIcon |[sectionDisplayIcon](../resources/sectiondisplayicon.md)| The icon displayed for the section. Optional. The **skinTone** property of the icon can't be set and is derived from user settings. |
52
-
| displayName | String | The display name of the section. Required. Maximum length is 50 characters. |
52
+
| displayName | String | The display name of the section. Required. Maximum length is 50 characters. Display names are case-sensitive and must be unique within a user's sections. The following names are reserved for system-defined sections and can't be used: `RecentChats`, `QuickViews`, `TeamsAndChannels`, `MutedChats`, `MeetingChats`, `EngageCommunities`. |
53
53
| isExpanded | Boolean | Indicates whether the section is expanded in the user interface. Optional. The default value is `true`. |
54
54
| sortType | sectionSortType | The sort order of items in the section. Optional. The default value is `userDefinedCustomOrder`. The valid values for user-defined sections are: `mostRecent`, `unreadThenMostRecent`, `userDefinedCustomOrder`, `unknownFutureValue`. The `nameAlphabetical` member isn't valid for user-defined sections. |
55
55
@@ -60,6 +60,20 @@ If successful, this method returns a `201 Created` response code and a [teamwork
60
60
> [!NOTE]
61
61
> The response includes an updated **@odata.etag** value. Use this value as the `If-Match` header for any subsequent mutation operations.
62
62
63
+
The following errors are possible.
64
+
65
+
| Response code | Message |
66
+
|:---|:---|
67
+
|`400 Bad Request`| The 'displayName' property is required and must not be empty. |
68
+
|`400 Bad Request`| The 'displayName' property must not exceed 50 characters. |
69
+
|`400 Bad Request`| The section display name contains invalid characters or format. |
70
+
|`400 Bad Request`| The 'id', 'createdDateTime', 'lastModifiedDateTime', 'sectionType', or 'isHierarchicalViewEnabled' property is read-only and must not be provided when creating a section. |
71
+
|`400 Bad Request`| The 'displayIcon.contentUrl' property is not supported, or the 'displayIcon.displayName' or 'displayIcon.skinTone' property is read-only and must not be provided. |
72
+
|`400 Bad Request`| The maximum number of sections has been reached. |
73
+
|`409 Conflict`| A section with this display name already exists. Returned when the requested **displayName** matches an existing user-defined section or one of the reserved system-defined section names (`RecentChats`, `QuickViews`, `TeamsAndChannels`, `MutedChats`, `MeetingChats`, `EngageCommunities`). The comparison is case-sensitive. |
74
+
|`412 Precondition Failed`| The `If-Match` header value doesn't match the current section hierarchy version. [List sections](userteamwork-list-sections.md) again to retrieve the current **@microsoft.graph.sectionsVersion** annotation and retry. |
75
+
|`428 Precondition Required`| The `If-Match` header is required for this operation. |
Copy file name to clipboardExpand all lines: api-reference/beta/resources/teamworksection.md
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@ Represents a section in a user's Microsoft Teams chat list that organizes chats,
33
33
|:---------|:-----|:------------|
34
34
| createdDateTime | DateTimeOffset | Date and time when the section was created. Read-only. The timestamp type represents date and time information using ISO 8601 format and is always in UTC. For example, midnight UTC on Jan 1, 2024, is `2024-01-01T00:00:00Z`. |
35
35
| displayIcon |[sectionDisplayIcon](sectiondisplayicon.md)| The icon displayed for the section. |
36
-
| displayName | String | The display name of the section. Required. Maximum length is 50 characters. |
36
+
| displayName | String | The display name of the section. Required. Maximum length is 50 characters. Display names are case-sensitive and must be unique within a user's sections. The following names are reserved for system-defined sections and can't be used when creating a user-defined section: `RecentChats`, `QuickViews`, `TeamsAndChannels`, `MutedChats`, `MeetingChats`, `EngageCommunities`. |
37
37
| id | String | The unique identifier for the section. Read-only. |
38
38
| isExpanded | Boolean | Indicates whether the section is expanded in the user interface. The default value is `true`. |
39
39
| isHierarchicalViewEnabled | Boolean | Indicates whether the hierarchical view is enabled for the section. Read-only. |
@@ -49,6 +49,21 @@ Represents a section in a user's Microsoft Teams chat list that organizes chats,
49
49
| systemDefined | A section managed by the service that can't be deleted. Only the **sortType** property can be updated. |
System-defined sections are provisioned by the service and appear in every user's section list. Their **displayName** values are reserved and can't be used for user-defined sections.
55
+
56
+
| displayName | Description |
57
+
|:------------|:------------|
58
+
| RecentChats | The default chats section. |
59
+
| QuickViews | The Quick views section. |
60
+
| TeamsAndChannels | The teams and channels section. |
61
+
| MutedChats | The muted chats section. |
62
+
| MeetingChats | The meeting chats section. |
63
+
| EngageCommunities | The communities section. |
64
+
65
+
System-defined sections can't be deleted, and only the **sortType** property can be updated. Attempts to update other properties or to delete a system-defined section return `403 Forbidden`. Listing [items](teamworksectionitem.md) on a system-defined section is not supported and returns `400 Bad Request`.
0 commit comments