gpt4 book ai didi

azure - 根据 AAD ID 检索 Teams 用户 ID

转载 作者:行者123 更新时间:2023-12-04 11:40:50 27 4
gpt4 key购买 nike

我正在尝试启动预定的主动对话(机器人在预定时间启动对话)。我设法根据 Graph API 获取用户的 AAD ID,但它与 Teams 用户 ID 不匹配。尝试了两个多小时才获得正确的ID,但我不知道如何获得。我应该采取的最佳方法是什么?

最佳答案

查看 Microsoft Graph api get the chat thread ID .

When the app is installed for the user, the bot will get receive a conversationUpdate event that will contain the necessary information for it to send the proactive message. For more information, see Bot events.

If you lose the chatThreadId, you can find it again by calling:

GET /users/{user-id}/chats?$filter=installedApps/any(a:a/teamsApp/id eq '{teamsAppid}')

但是,这仅适用于个人范围!我的建议是确保您捕获安装后触发的 conversationUpdate 并将用户详细信息保留在数据库中。

关于azure - 根据 AAD ID 检索 Teams 用户 ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61632246/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com