我创建了一个可以在个人范围内使用的机器人。它所做的就是让用户可以向其发送图像。
这可以在我们的环境中找到,我看到的输入数据如下
{"attachments":[
{
"contentType":"application/vnd.microsoft.teams.file.download.info",
"content":{
"downloadUrl":"https://xxx-my.sharepoint.com/personal/xxx/_layouts/15/download.aspx?UniqueId=92916186-74d8-414e-9265-82867282ba20",
"uniqueId":"92916186-74d8-414e-9265",
"fileType":"jpg"
},
"contentUrl":"https://XXX.sharepoint.com/personal/YYYY/Documents/Microsoft Teams Chat Files/ak.JPG","name":"ak.JPG"}
],
"type":"message",
"timestamp":"2019-08-11T01:33:23.3095245Z",
"id":"1565487203294",
"channelId":"msteams",
"serviceUrl":"https://smba.trafficmanager.net/amer/",
"from":{"id":"29:1iI7IMgfFnGziBXEFsgn4WHRvGs9wCCl3WDGOsKtptLnn7nhBE7X92Yjy",
"name":"Neeti Sharma",
"aadObjectId":"37a2516a-baf2-41d8-a406-a067888d676c"
},
"conversation":
{"conversationType":"personal",
"tenantId":"9bfb3569-994e-4908-855c-c7f6c1a94100",
"id":"a:1_2tYYihE01oxYBXNSVVBuspJtmvlbmaRsRliL3namhmef_lT6XZgM"
},
"recipient":{"id":"28:ebf30a33-d682-473d-",
"name":"ScanBuddyV2"},
"entities":[
{"locale":"en-US",
"country":"US",
"platform":"Mac",
"type":"clientInfo"}],
"channelData":{
"tenant":{"id":"9bfb3569-994e-4908-855c-c7f6c1a94100"}},
"locale":"en-US"}
我需要的只是发送它的用户电子邮件。我该怎么办?
答案 0 :(得分:3)
您的漫游器可以访问有关团队或聊天的其他上下文,例如用户个人资料。您可以在Bot上下文中获取电子邮件ID。请查看此文档Get context for your Microsoft Teams bot,以了解更多信息。