aiInteractionHistory: getAllEnterpriseInteractions
命名空间:microsoft.graph
重要
Microsoft Graph /beta
版本下的 API 可能会发生更改。 不支持在生产应用程序中使用这些 API。 若要确定 API 是否在 v1.0 中可用,请使用 版本 选择器。
“获取所有智能 Microsoft 365 Copilot 副驾驶®交互数据,包括用户提示 Copilot 和 Copilot 响应。 此 API 捕获用户意向、Copilot 访问的资源,以及针对 Teams、Word 和 Outlook 等 Microsoft 365 应用的用户响应。
此 API 可用于以下国家级云部署。
全局服务 | 美国政府 L4 | 美国政府 L5 (DOD) | 由世纪互联运营的中国 |
---|---|---|---|
✅ | ❌ | ❌ | ❌ |
权限
为此 API 选择标记为最低特权的权限。 只有在应用需要它时,才使用更高的特权权限。 有关委派权限和应用程序权限的详细信息,请参阅权限类型。 要了解有关这些权限的详细信息,请参阅 权限参考。
权限类型 | 最低特权权限 | 更高特权权限 |
---|---|---|
委派(工作或学校帐户) | 不支持。 | 不支持。 |
委派(个人 Microsoft 帐户) | 不支持。 | 不支持。 |
应用程序 | AiEnterpriseInteraction.Read.All | 不可用。 |
HTTP 请求
GET /copilot/users/{id}/interactionHistory/getAllEnterpriseInteractions
可选的查询参数
根据首选的 许可和付款模型,可以使用支持值 A
和 B
的 model
查询参数,如以下示例所示。
GET /copilot/users/{id}/interactionHistory/getAllEnterpriseInteractions?model=A
GET /copilot/users/{id}/interactionHistory/getAllEnterpriseInteractions?model=B
如果未指定参数 model
,则使用 计算模式 。
此方法支持 日期范围参数 来自定义响应,如以下示例所示。
GET /copilot/users/{id}/interactionHistory/getAllEnterpriseInteractions?$filter=createdDateTime gt 2024-09-09T16:48:35Z and createdDateTime lt 2024-11-15T21:48:35Z
此方法还支持 $filter
OData 查询参数 来帮助自定义响应。 下表显示了一个示例。
应用场景 | 示例 |
---|---|
获取特定源的 Copilot 消息 | $filter=appClass eq 'IPM.SkypeTeams.Message.Copilot.Word' or appClass eq 'IPM.SkypeTeams.Message.Copilot.BizChat' |
请求标头
标头 | 值 |
---|---|
Authorization | 持有者 {token}。 必填。 详细了解 身份验证和授权。 |
响应
如果成功,此方法在响应正文中返回响应 200 OK
代码和 aiInteraction 对象的集合。
示例
示例 1:在不带任何筛选器的情况下检索所有 Copilot 交互
以下示例演示获取用户的所有 Copilot 交互的请求。
请求
以下示例显示了一个请求。
GET https://graph.microsoft.com/beta/copilot/users/9fcefe95-9677-483e-a3c1-22c5d501d737/interactionHistory/getAllEnterpriseInteractions
响应
以下示例显示了相应的响应。
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.aiInteraction)",
"@odata.count": 10,
"@odata.nextLink": "https://graph.microsoft.com/beta/copilot/users/4db02e4b-d144-400e-b194-53253a34c5be/interactionHistory/getAllEnterpriseInteractions?$skiptoken=U2tpcFZhbHVlPTEwI01haWxib3hGb2xkZXI9TWFpbEZvbGRlcnMvVGVhbXNNZXNzYWdlc0RhdGE%3d",
"value": [
{
"id": "1731701801008",
"sessionId": "19:icg2t_AWPYJyJ2oDLB_CZyh29QXpZvbdpljKf7qKotk1@thread.v2",
"requestId": "7336770c-fb25-48ac-8303-4493ad11ed71",
"appClass": "IPM.SkypeTeams.Message.Copilot.Teams",
"interactionType": "aiResponse",
"conversationType": "appchat",
"etag": "1731701801008",
"createdDateTime": "2024-11-15T20:16:41.008Z",
"locale": "en-us",
"contexts": [
{
"contextReference": "https://microsoft.teams.com/threads/19:meeting_YjQ4NThlNzUtMjEyNC00MjFlLTk0ODMtZTc2M2Q5MDVlNTE4@thread.v2",
"displayName": "Teams Meeting Copilot",
"contextType": "TeamsMeeting"
}
],
"from": {
"@odata.type": "#microsoft.graph.chatMessageFromIdentitySet",
"device": null,
"user": null,
"application": {
"@odata.type": "#microsoft.graph.teamworkApplicationIdentity",
"id": "fb8d773d-7ef8-4ec0-a117-179f88add510",
"displayName": "Copilot in Teams",
"applicationIdentityType": "bot"
}
},
"body": {
"contentType": "text",
"content": "I use the transcript to generate insights, and need to hear more discussion before I can get to work. Please try again in a few minutes.<attachment id=\"19:meeting_YjQ4NThlNzUtMjEyNC00MjFlLTk0ODMtZTc2M2Q5MDVlNTE4@thread.v2\"></attachment>"
},
"attachments": [
{
"attachmentId": "19:meeting_YjQ4NThlNzUtMjEyNC00MjFlLTk0ODMtZTc2M2Q5MDVlNTE4@thread.v2",
"contentType": "reference",
"contentUrl": "https://microsoft.teams.com/threads/19:meeting_YjQ4NThlNzUtMjEyNC00MjFlLTk0ODMtZTc2M2Q5MDVlNTE4@thread.v2",
"content": null,
"name": "Teams Meeting Copilot"
}
],
"links": [],
"mentions": []
}
]
}
示例 2:获取具有应用类筛选器的用户的所有 Copilot 交互
以下示例演示一个请求,该请求获取具有应用类筛选器的用户的所有 Copilot 交互。
请求
以下示例显示了一个请求。
GET https://graph.microsoft.com/beta/copilot/users/4db02e4b-d144-400e-b194-53253a34c5be/interactionHistory/getAllEnterpriseInteractions?$filter=appClass eq 'IPM.SkypeTeams.Message.Copilot.BizChat'
响应
以下示例显示了相应的响应。
注意:为了提高可读性,可能缩短了此处显示的响应对象。
HTTP/1.1 200 OK
Content-type: application/json
{
"@odata.context": "https://graph.microsoft.com/beta/$metadata#Collection(microsoft.graph.aiInteraction)",
"@odata.count": 2,
"@odata.nextLink": "https://graph.microsoft.com/beta/copilot/users/4db02e4b-d144-400e-b194-53253a34c5be/interactionHistory/getAllEnterpriseInteractions?$filter=appClass+eq+%27IPM.SkypeTeams.Message.Copilot.BizChat%27&$skiptoken=U2tpcFZhbHVlPTAjTWFpbGJveEZvbGRlcj1NYWlsRm9sZGVycy9UZWFtQ2hhdA%3d%3d",
"value": [
{
"id": "1732148357313",
"sessionId": "19:YzBP1kUdkNjFtJnketPYT8kQdQ3A08Y51rDTxE_ENIk1@thread.v2",
"requestId": "f128b7a9-657e-b420-201e-5602114a29f4",
"appClass": "IPM.SkypeTeams.Message.Copilot.BizChat",
"interactionType": "aiResponse",
"conversationType": "bizchat",
"etag": "1732148357313",
"createdDateTime": "2024-11-21T00:19:17.313Z",
"locale": "en-us",
"contexts": [],
"from": {
"@odata.type": "#microsoft.graph.chatMessageFromIdentitySet",
"device": null,
"user": null,
"application": {
"@odata.type": "#microsoft.graph.teamworkApplicationIdentity",
"id": "fb8d773d-7ef8-4ec0-a117-179f88add510",
"displayName": "Microsoft 365 Chat",
"applicationIdentityType": "bot"
}
},
"body": {
"contentType": "html",
"content": "<attachment id=\"4062fb240a03490b98ccd7c86bb2bcbf\"></attachment>"
},
"attachments": [
{
"attachmentId": "4062fb240a03490b98ccd7c86bb2bcbf",
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": "{\r\n \"type\": \"AdaptiveCard\",\r\n \"version\": \"1.0\",\r\n \"body\": [\r\n {\r\n \"type\": \"TextBlock\",\r\n \"text\": \"It looks like there were no important emails from last week. However, I found some relevant meetings and files that might be of interest to you.\\n\\nFrom your meetings last week:\\n- **[test meeting2 - export api](https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABCrxI6AAA%3d)**: You discussed the need to send a reminder about an upcoming event, possibly Ignite, scheduled for next week. You emphasized the importance of the event and the reminder[1](https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABCrxI6AAA%3d).\\n- **[new meeting to test copilot interaction in meetings](https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABCrxI5AAA%3d)**: This meeting was held last Friday from 12:30 PM to 1 PM[2](https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABCrxI5AAA%3d).\\n- **[teste meeting](https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABAvsP6AAA%3d)**: You explained the significance of the Nobel Prize in Economics and announced the 2024 Nobel Prize winners, Darren Simon Johnson and James A. Robinson[3](https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABAvsP6AAA%3d).\\n\\nAdditionally, there is a file titled **[OnCall DRI Handbook-v3](https://m365cpi17278319-my.sharepoint.com/personal/corat_m365cpi17278319_onmicrosoft_com/Documents/Microsoft%20Copilot%20Chat%20Files/OnCall%20DRI%20Handbook-v3.pdf?web=1)** that you last modified on February 4th, 2021. This document provides guidelines on handling incidents and includes important terminology and procedures[4](https://m365cpi17278319-my.sharepoint.com/personal/corat_m365cpi17278319_onmicrosoft_com/Documents/Microsoft%20Copilot%20Chat%20Files/OnCall%20DRI%20Handbook-v3.pdf?web=1).\\n\\nIs there anything specific you would like to know more about?\",\r\n \"wrap\": true\r\n },\r\n {\r\n \"type\": \"TextBlock\",\r\n \"id\": \"MessageTextField\",\r\n \"text\": \"It looks like there were no important emails from last week. However, I found some relevant meetings and files that might be of interest to you.\\n\\nFrom your meetings last week:\\n- **test meeting2 - export api[3]**: You discussed the need to send a reminder about an upcoming event, possibly Ignite, scheduled for next week. You emphasized the importance of the event and the reminder[^2^].\\n- **new meeting to test copilot interaction in meetings[3]**: This meeting was held last Friday from 12:30 PM to 1 PM[^3^].\\n- **teste meeting[3]**: You explained the significance of the Nobel Prize in Economics and announced the 2024 Nobel Prize winners, Darren Simon Johnson and James A. Robinson[^4^].\\n\\nAdditionally, there is a file titled **OnCall DRI Handbook-v3[2]** that you last modified on February 4th, 2021. This document provides guidelines on handling incidents and includes important terminology and procedures[^1^].\\n\\nIs there anything specific you would like to know more about?\",\r\n \"wrap\": true\r\n }\r\n ]\r\n}",
"name": null
}
],
"links": [
{
"linkUrl": "https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABCrxI6AAA%3d&EntityRepresentationId=eed881a3-3121-4c71-8667-942284009b65",
"displayName": "test meeting2 - export api",
"linkType": "Event"
},
{
"linkUrl": "https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABCrxI6AAA%3d",
"displayName": "test meeting2 - export api",
"linkType": "Meeting"
},
{
"linkUrl": "https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABCrxI5AAA%3d&EntityRepresentationId=f0ccfd8e-4503-4a1d-b843-b61d63bc0cc0",
"displayName": "new meeting to test copilot interaction in meetings",
"linkType": "Event"
},
{
"linkUrl": "https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABCrxI5AAA%3d",
"displayName": "new meeting to test copilot interaction in meetings",
"linkType": "Meeting"
},
{
"linkUrl": "https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABAvsP6AAA%3d&EntityRepresentationId=c619b244-8016-45ca-a0fb-e6a55d28d252",
"displayName": "teste meeting",
"linkType": "Event"
},
{
"linkUrl": "https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABAvsP6AAA%3d",
"displayName": "teste meeting",
"linkType": "Meeting"
},
{
"linkUrl": "https://m365cpi17278319-my.sharepoint.com/personal/corat_m365cpi17278319_onmicrosoft_com/Documents/Microsoft%20Copilot%20Chat%20Files/OnCall%20DRI%20Handbook-v3.pdf?web=1&EntityRepresentationId=025f05ac-5d7e-4ee1-b616-a786cd13d8c2",
"displayName": "OnCall DRI Handbook-v3.pdf",
"linkType": "File"
}
],
"mentions": []
},
{
"id": "1732148356886",
"sessionId": "19:YzBP1kUdkNjFtJnketPYT8kQdQ3A08Y51rDTxE_ENIk1@thread.v2",
"requestId": "f128b7a9-657e-b420-201e-5602114a29f4",
"appClass": "IPM.SkypeTeams.Message.Copilot.BizChat",
"interactionType": "userPrompt",
"conversationType": "bizchat",
"etag": "1732148356886",
"createdDateTime": "2024-11-21T00:19:16.886Z",
"locale": "en-us",
"contexts": [],
"from": {
"@odata.type": "#microsoft.graph.chatMessageFromIdentitySet",
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "4db02e4b-d144-400e-b194-53253a34c5be",
"displayName": "8:orgid:4db02e4b-d144-400e-b194-53253a34c5be",
"userIdentityType": "aadUser",
"tenantId": "061ea7c2-cc15-418b-bfc0-9f6a7d98011c"
}
},
"body": {
"contentType": "text",
"content": "What should be on my radar from emails last week?"
},
"attachments": [],
"links": [],
"mentions": []
}
]
}