列出聊天中的选项卡
命名空间:microsoft.graph
注意:如果聊天与 onlineMeeting 实例关联,则实际上,将列出固定在会议中的选项卡。
权限
要调用此 API,需要以下权限之一。要了解详细信息,包括如何选择权限的信息,请参阅权限。
| 权限类型 | 权限(从最低特权到最高特权) |
|---|---|
| 委派(工作或学校帐户) | TeamsTab.ReadWriteForChat、TeamsTab.Read.All、TeamsTab.ReadWrite.All |
| 委派(个人 Microsoft 帐户) | 不支持。 |
| 应用程序 | TeamsTab.ReadWriteForChat.All、TeamsTab.Read.All、TeamsTab.ReadWrite.All |
HTTP 请求
GET /chats/{chat-id}/tabs
可选的查询参数
此方法支持使用 $filter、$select 和$expand OData 查询参数来帮助自定义响应。
请求标头
| 标头 | 值 |
|---|---|
| Authorization | Bearer {token}。必需。 |
请求正文
请勿提供此方法的请求正文。
响应
如果成功,此方法在响应 200 OK 正文中返回 响应代码和 tabs 对象集合。
示例
示例 1:列出聊天中所有选项卡以及关联的Teams应用程序
请求
下面展示了示例请求。
GET https://graph.microsoft.com/v1.0/chats/19:d65713bc498c4a428c71ef9353e6ce20@thread.v2/tabs?$expand=teamsApp
响应
下面展示了示例响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 Success
Content-type: application/json
{
"value": [
{
"id": "794f0e4e-4d10-4bb5-9079-3a465a629eff",
"displayName": "My Contoso Tab - updated",
"sortOrderIndex": "20",
"webUrl": "https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.web/_djb2_msteams_prefix_193fe248-24e6-478f-a66c-ede9ce6dd547?context=%7b%0d%0a++%22context%22%3a+%22chat%22%2c%0d%0a++%22chatId%22%3a+%2219%3ad65713bc498c4a428c71ef9353e6ce20%40thread.v2%22%2c%0d%0a++%22subEntityId%22%3a+null%0d%0a%7d&tenantId=139d16b4-7223-43ad-b9a8-674ba63c7924",
"configuration": {
"entityId": "2DCA2E6C7A10415CAF6B8AB6661B3154",
"contentUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154/tabView",
"websiteUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154",
"removeUrl": "https://www.contoso.com/Orders/2DCA2E6C7A10415CAF6B8AB6661B3154/uninstallTab"
},
"teamsApp": {
"id": "06805b9e-77e3-4b93-ac81-525eb87513b8",
"displayName": "Contoso",
"distributionMethod": "store"
}
},
{
"id": "1f7b40e5-ecdf-40cb-b02e-e785cf71c0e9",
"displayName": "Website2",
"teamsAppId": null,
"sortOrderIndex": "10000100",
"messageId": "1607411851584",
"webUrl": "https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.web/_djb2_msteams_prefix_44125e1d-04b1-421a-9f45-19d913494b3e?context=%7b%0d%0a++%22context%22%3a+%22chat%22%2c%0d%0a++%22chatId%22%3a+%2219%3ad65713bc498c4a428c71ef9353e6ce20%40thread.v2%22%2c%0d%0a++%22subEntityId%22%3a+null%0d%0a%7d&tenantId=139d16b4-7223-43ad-b9a8-674ba63c7924",
"configuration": {
"entityId": null,
"contentUrl": "https://www.bing.com",
"removeUrl": null,
"websiteUrl": "https://www.bing.com",
"dateAdded": "2020-12-08T07:17:29.748Z"
},
"teamsApp": {
"id": "com.microsoft.teamspace.tab.web",
"externalId": null,
"displayName": "Website",
"distributionMethod": "store"
}
},
{
"id": "b92dd123-1624-425c-a808-2f11e03534a5",
"displayName": "Some random board",
"sortOrderIndex": "10000100100",
"messageId": "1607412162267",
"webUrl": "https://teams.microsoft.com/l/entity/49e6f432-d79c-49e8-94f7-89b94f3672fd/_djb2_msteams_prefix_2919ec48-12d8-4533-b849-56c4d207734b?context=%7b%0d%0a++%22context%22%3a+%22chat%22%2c%0d%0a++%22chatId%22%3a+%2219%3ad65713bc498c4a428c71ef9353e6ce20%40thread.v2%22%2c%0d%0a++%22subEntityId%22%3a+null%0d%0a%7d&tenantId=139d16b4-7223-43ad-b9a8-674ba63c7924",
"configuration": {
"entityId": "5fcf29c17a3a3142160b8694",
"contentUrl": "https://trello.com/integrations/teams/tab-content?iframeSource=msteams&contentUrl=https%3A%2F%2Ftrello.com%2Fb%2FkS2FslqK%2Fsome-random-board",
"removeUrl": "https://trello.com/integrations/teams/tab-delete?iframeSource=msteams",
"websiteUrl": "https://trello.com/b/kS2FslqK/some-random-board",
"dateAdded": "2020-12-08T07:22:40.001Z"
},
"teamsApp": {
"id": "49e6f432-d79c-49e8-94f7-89b94f3672fd",
"externalId": null,
"displayName": "Trello",
"distributionMethod": "store"
}
}
]
}
示例 2:列出聊天中属于特定应用的所有选项卡
请求
下面展示了示例请求。
GET https://graph.microsoft.com/v1.0/chats/19:d65713bc498c4a428c71ef9353e6ce20@thread.v2/tabs?$expand=teamsApp&$filter=teamsApp/id eq 'com.microsoft.teamspace.tab.web'
响应
下面展示了示例响应。
注意: 为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 Success
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#chats('19%3Ad65713bc498c4a428c71ef9353e6ce20%40thread.v2')/tabs(teamsApp())",
"@odata.count": 1,
"value": [
{
"id": "1f7b40e5-ecdf-40cb-b02e-e785cf71c0e9",
"displayName": "Website2",
"teamsAppId": null,
"sortOrderIndex": "10000100",
"messageId": "1607411851584",
"webUrl": "https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.web/_djb2_msteams_prefix_44125e1d-04b1-421a-9f45-19d913494b3e?context=%7b%0d%0a++%22context%22%3a+%22chat%22%2c%0d%0a++%22chatId%22%3a+%2219%3ad65713bc498c4a428c71ef9353e6ce20%40thread.v2%22%2c%0d%0a++%22subEntityId%22%3a+null%0d%0a%7d&tenantId=139d16b4-7223-43ad-b9a8-674ba63c7924",
"configuration": {
"entityId": null,
"contentUrl": "https://www.bing.com",
"removeUrl": null,
"websiteUrl": "https://www.bing.com",
"dateAdded": "2020-12-08T07:17:29.748Z"
},
"teamsApp": {
"id": "com.microsoft.teamspace.tab.web",
"externalId": null,
"displayName": "Website",
"distributionMethod": "store"
}
}
]
}
另请参阅
反馈
提交和查看相关反馈