Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
Importante
As APIs sob a /beta versão estão sujeitas a alterações. Não há suporte para o uso dessas APIs em aplicativos de produção.
Obtenha todos os dados de interação do Microsoft 365 Copilot, incluindo prompts do usuário para o Copilot e respostas do Copilot. Essa API captura a intenção do usuário, os recursos acessados pelo Copilot e a resposta ao usuário para aplicativos do Microsoft 365, como Teams, Word e Outlook.
Para saber mais sobre como usar as APIs de exportação do Microsoft Teams para exportar conteúdo, consulte Exportar conteúdo com as APIs de exportação do Microsoft Teams.
Observação
Essa API requer uma licença válida do Microsoft 365 Copilot com o plano de Microsoft Copilot with Graph‑grounded chat serviço.
Essa API está disponível nas seguintes implantações de nuvem nacional.
| Serviço global | Governo dos EUA L4 | US Government L5 (DOD) | China operada pela 21Vianet |
|---|---|---|---|
| ✅ | ✅ | ✅ | ❌ |
Permissões
Escolha a(s) permissão(s) marcada(s) como menos privilegiada(s) para essa API. Use uma permissão ou permissões com privilégios mais altos somente se o aplicativo exigir. Para obter detalhes sobre permissões delegadas e de aplicativo, consulte Tipos de permissão. Para saber mais sobre essas permissões, consulte a referência de permissões.
| Tipo de permissão | Permissões menos privilegiadas | Permissões com privilégios mais elevados |
|---|---|---|
| Delegado (conta corporativa ou de estudante) | Sem suporte. | Sem suporte. |
| Delegado (conta pessoal da Microsoft) | Sem suporte. | Sem suporte. |
| Application | AiEnterpriseInteraction.Read.All | Indisponível. |
Importante
O conjunto de interações retornadas varia com base no licenciamento do Copilot e nas experiências de IA em seu locatário que gravam no serviço de histórico de interação.
Solicitação HTTP
GET https://graph.microsoft.com/v1.0/copilot/users/{id}/interactionHistory/getAllEnterpriseInteractions
GET https://graph.microsoft.com/beta/copilot/users/{id}/interactionHistory/getAllEnterpriseInteractions
Observação
- Não há suporte para a chamada de função delta.
- Essa API não recupera interações em agentes criados pelo Copilot Studio.
Parâmetros de consulta opcionais
Esse método dá suporte aos $topparâmetros de consulta OData e intervalos de dados para personalizar a resposta. Para um desempenho ideal, o valor recomendado $top é 100.
Esse método também dá suporte ao $filterparâmetro de consulta OData para ajudar a personalizar a resposta, conforme mostrado nos Exemplos 2: obter todas as interações do Copilot para um usuário com filtros de classe de aplicativo.
Cabeçalhos de solicitação
| Nome | Descrição |
|---|---|
Authorization |
Bearer {token}. Obrigatório. Saiba mais sobre autenticação e autorização. |
Resposta
Se for bem-sucedido, esse método retornará um 200 OK código de resposta e uma coleção de objetos aiInteraction no corpo da resposta.
Exemplos
Exemplo 1: recuperar todas as interações do Copilot sem filtros
O exemplo a seguir mostra uma solicitação que obtém todas as interações do Copilot para um usuário.
Solicitação
O exemplo a seguir mostra uma solicitação.
GET https://graph.microsoft.com/v1.0/copilot/users/9fcefe95-9677-483e-a3c1-22c5d501d737/interactionHistory/getAllEnterpriseInteractions
GET https://graph.microsoft.com/beta/copilot/users/9fcefe95-9677-483e-a3c1-22c5d501d737/interactionHistory/getAllEnterpriseInteractions
Resposta
O exemplo a seguir mostra a resposta. O objeto de resposta mostrado aqui pode ser reduzido para facilitar a leitura.
HTTP/1.1 200 OK
Content-type: application/json
{
"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": []
}
]
}
Exemplos 2: obter todas as interações do Copilot para um usuário com filtros de classe de aplicativo
O exemplo a seguir mostra uma solicitação que obtém todas as interações do Copilot para um usuário com filtros de classe de aplicativo.
Solicitação
O exemplo a seguir mostra uma solicitação.
GET https://graph.microsoft.com/v1.0/copilot/users/4db02e4b-d144-400e-b194-53253a34c5be/interactionHistory/getAllEnterpriseInteractions?$filter=appClass eq 'IPM.SkypeTeams.Message.Copilot.BizChat'
GET https://graph.microsoft.com/beta/copilot/users/4db02e4b-d144-400e-b194-53253a34c5be/interactionHistory/getAllEnterpriseInteractions?$filter=appClass eq 'IPM.SkypeTeams.Message.Copilot.BizChat'
Resposta
O exemplo a seguir mostra a resposta. O objeto de resposta mostrado aqui pode ser reduzido para facilitar a leitura.
HTTP/1.1 200 OK
Content-type: application/json
{
"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- **[test 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- **test 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": "test meeting",
"linkType": "Event"
},
{
"linkUrl": "https://teams.microsoft.com/l/meeting/details?eventId=AAMkADcyZTMzNWZhLWE1YjAtNDc3Mi04MzBlLTc2NzEzOTE0MmU1ZQBGAAAAAAC5e4DRHIMCQJ-tS6nB82CZBwCMIOyf3WTwTIsBMwZamp77AAAAAAENAACMIOyf3WTwTIsBMwZamp77AABAvsP6AAA%3d",
"displayName": "test 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": []
}
]
}
Exemplo 3: obter todas as interações do Copilot para um usuário com filtros createdDateTime
O exemplo a seguir mostra uma solicitação que obtém todas as interações do Copilot para um usuário em um intervalo de datas específico.
Observação
Ao usar o createdDateTime filtro, forneça um limite de tempo mínimo e máximo.
Solicitação
O exemplo a seguir mostra uma solicitação.
GET https://graph.microsoft.com/v1.0/copilot/users/254efcd0-5094-4fc5-b2b3-1637629393e1/interactionhistory/getallenterpriseinteractions?$filter=createdDateTime gt 2025-11-24T00:00:00Z and createdDateTime lt 2025-11-25T00:00:00Z
GET https://graph.microsoft.com/beta/copilot/users/254efcd0-5094-4fc5-b2b3-1637629393e1/interactionhistory/getallenterpriseinteractions?$filter=createdDateTime gt 2025-11-24T00:00:00Z and createdDateTime lt 2025-11-25T00:00:00Z
Resposta
O exemplo a seguir mostra a resposta. O objeto de resposta mostrado aqui pode ser reduzido para facilitar a leitura.
HTTP/1.1 200 OK
Content-type: application/json
{
"value": [
{
"id": "1764008994427",
"sessionId": "19:4MaLljqiHJSD-rKYK-aqJmaGuUgmlsBgQxeXaUspdz41@thread.v2",
"requestId": "79699122-d834-6cc2-c1df-0332a0bd982d",
"appClass": "IPM.SkypeTeams.Message.Copilot.BizChat",
"interactionType": "userPrompt",
"conversationType": "bizchat",
"etag": "1764008994427",
"createdDateTime": "2025-11-24T18:29:54.427Z",
"locale": "en-us",
"contexts": [],
"from": {
"@odata.type": "#microsoft.graph.chatMessageFromIdentitySet",
"application": null,
"device": null,
"user": {
"@odata.type": "#microsoft.graph.teamworkUserIdentity",
"id": "254efcd0-5094-4fc5-b2b3-1637629393e1",
"displayName": "8:orgid:254efcd0-5094-4fc5-b2b3-1637629393e1",
"userIdentityType": "aadUser",
"tenantId": "c9d0512d-d402-4cfa-becc-4407bcf48a2d"
}
},
"body": {
"contentType": "text",
"content": "What are the key action items from my recent meetings?"
},
"attachments": [],
"links": [],
"mentions": []
}
]
}
Conteúdo relacionado
Limites de limitação específicos do serviço do Microsoft Graph