简体   繁体   English

如何从msteams中的ChatBot获取群聊添加的成员列表

[英]How to get the Group chat added member list from ChatBot in msteams

how to collect all the group chat members from the chat bot using MSTeams?如何使用 MSTeams 从聊天机器人收集所有群聊成员?

在此处输入图片说明

You can use the GetPagedMembers capability for this - see the docs from Microsoft here: https://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context?tabs=dotnet (switch to your language of choice in the samples blocks).您可以为此使用 GetPagedMembers 功能 - 请在此处查看 Microsoft 的文档: https ://docs.microsoft.com/en-us/microsoftteams/platform/bots/how-to/get-teams-context?tabs=dotnet(在示例块中切换到您选择的语言)。

Note that, using this approach, you can only do this when the user is actually interacting with the bot (eg posting a message) because you need the context.请注意,使用这种方法,您只能在用户实际与机器人交互(例如发布消息)时执行此操作,因为您需要上下文。 If that's a problem let me know and I will send additional info.如果这是一个问题,请告诉我,我会发送更多信息。

Here are the two ways that can work for you这里有两种方法对你有用

  1. Using graph - List members of a chat .使用图表列出聊天的成员 Refer this sample .请参阅此示例
  2. Get conversation member. 获取对话成员。 (you are already aware about this as I can see.) (正如我所见,您已经意识到这一点。)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM