问题描述
我正在使用图形API通过查询从Microsoft Teams渠道获取chatMessage
https://graph.microsoft.com/beta/teams/XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/channels/19:[email protected]/messages
这在大多数情况下都很好用,但是当使用该频道的电子邮件地址向该频道发送消息时出现问题。
对于此类消息,团队客户会显示发件人的电子邮件地址以及电子邮件图标like this (can not yet embed)。
但是从图形API获取消息时,from
字段为null
。
例如:
{
"@odata.type": "#microsoft.graph.chatMessage","replyToId": null,"etag": "1599449691180","messageType": "message","createdDateTime": "2020-09-07T03:34:51.18Z","lastModifiedDateTime": null,"deletedDateTime": null,"subject": "テスト件名","summary": null,"chatId": null,"importance": "normal","locale": "en-us","webUrl": "(retracted)","from": null,"policyViolation": null,"id": "1599449691180","body": {
"contentType": "html","content": "テストメール<br>\n<br>"
},"channelIdentity": {
"teamId": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX","channelId": "19:[email protected]"
},"attachments": [],"mentions": [],"reactions": []
}
有什么方法可以获取发件人的电子邮件地址,如在团队客户端中显示的那样?
还是该事实是通过外部来源的电子邮件提交的?
修改/说明: 看来,只有在电子邮件不是来自O365帐户或发件人不是团队成员的情况下,这种情况才会发生。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)