Microsoft Graph API-“获取频道消息”在反应对象中返回空的显示名称

时间:2020-01-24 01:26:13

标签: microsoft-graph-api

https://docs.microsoft.com/en-us/graph/api/channel-get-message?view=graph-rest-beta&tabs=http

通过Graph API检索消息时,如果消息有反应,则displayName始终为null,但会返回ID。 例如,如果消息中有提及,则成功返回displayName。 要求网址: https://graph.microsoft.com/beta/teams/teamID/channels/channeID/messages/messageID/

响应正文:(删除了一些信息) 在'from对象中也能正常工作。

{
"@odata.context": "https://graph/redacted",
"id": "redacted"
"replyToId": null,
"etag": "redacted",
"messageType": "message",
"createdDateTime": "2021-01-23T05:50:30.613Z",
"lastModifiedDateTime": null,
"deletedDateTime": null,
"subject": null,
"summary": null,
"importance": "normal",
"locale": "en-us",
"webUrl": ""redacted"",
"policyViolation": null,
"from": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "449333353311fdc",
"displayName": ""redacted"",
"userIdentityType": "aadUser"
}
},
"body": {
"contentType": "html",
"content": "

This is tdt>
\n
"
},
"attachments": [],
"mentions": [
{
"id": 0,
"mentionText": "redacted"",
"mentioned": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "1d1231231bca0e",
"displayName": "redacted (works fine)",
"userIdentityType": "aadUser"
}
}
}
],
"reactions": [
{
"reactionType": "laugh",
"createdDateTime": "2020-01-24T01:13:18.41Z",
"user": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "962d9ergargaeeb7",
"displayName": null,
"userIdentityType": "aadUser"
}
}
},
{
"reactionType": "like",
"createdDateTime": "2020-01-23T05:50:41.838Z",
"user": {
"application": null,
"device": null,
"conversation": null,
"user": {
"id": "449aa77d-4afawdawdadw11fdc",
"displayName": null,
"userIdentityType": "aadUser"
}
}
}
]
}

0 个答案:

没有答案