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).
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
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.