Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Namespace: microsoft.graph
Important
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.
Get the list of sections in a user's teamwork.
This API is available in the following national cloud deployments.
| Global service | US Government L4 | US Government L5 (DOD) | China operated by 21Vianet |
|---|---|---|---|
| ✅ | ✅ | ✅ | ✅ |
Permissions
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) | TeamworkSection.Read | TeamworkSection.ReadWrite |
| Delegated (personal Microsoft account) | Not supported. | Not supported. |
| Application | TeamworkSection.Read.All | TeamworkSection.ReadWrite.All |
HTTP request
GET /users/{user-id}/teamwork/sections
Optional query parameters
This method doesn't support OData query parameters to customize the response.
Request headers
| Header | Value |
|---|---|
| Authorization | Bearer {token}. Required. Learn more about authentication and authorization. |
Request body
Don't supply a request body for this method.
Response
If successful, this method returns a 200 OK response code and a collection of teamworkSection objects in the response body.
The response includes the following OData instance annotations on the collection.
| Annotation | Type | Description |
|---|---|---|
| @microsoft.graph.sectionsOrder | String collection | An ordered array of section IDs that represent the user's preferred section order. |
| @microsoft.graph.sectionsVersion | String | The current section hierarchy version. Use this value as the If-Match header for optimistic concurrency control on mutation operations (create, update, or delete sections, and add, remove, or move items). |
Examples
Request
The following example shows a request.
GET https://graph.microsoft.com/beta/users/10f8c3a6-3e2a-4e8b-9c7d-5a4b6c8d9e0f/teamwork/sections
Response
The following example shows the response.
Note: The response object shown here might be shortened for readability.
HTTP/1.1 200 OK
Content-type: application/json
{
"@microsoft.graph.sectionsOrder": [
"a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"b2c3d4e5-f6a7-8901-bcde-f12345678901"
],
"@microsoft.graph.sectionsVersion": "1742515200",
"value": [
{
"@odata.type": "#microsoft.graph.teamworkSection",
"@odata.etag": "\"1742515200\"",
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"displayName": "Favorites",
"displayIcon": {
"iconType": "⭐",
"displayName": "Star",
"contentUrl": null,
"skinTone": null
},
"sectionType": "userDefined",
"sortType": "mostRecent",
"isExpanded": true,
"isHierarchicalViewEnabled": false,
"createdDateTime": "2025-01-15T10:30:00Z",
"lastModifiedDateTime": "2025-03-01T14:22:00Z"
},
{
"@odata.type": "#microsoft.graph.teamworkSection",
"@odata.etag": "\"1742515200\"",
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"displayName": "Teams and Channels",
"displayIcon": null,
"sectionType": "systemDefined",
"sortType": "unreadThenMostRecent",
"isExpanded": true,
"isHierarchicalViewEnabled": true,
"createdDateTime": "2024-06-10T08:00:00Z",
"lastModifiedDateTime": "2025-02-28T16:45:00Z"
}
]
}