How to get list of channels and members in teams bot
Hi,
I’m working on building a Microsoft Teams bot and came across the TeamsInfo.getTeamChannels(turnContext, teamId) method in the BotBuilder SDK. Could you help clarify how it works? Specifically, how does turnContext return data for a team? I’ve already assigned all the necessary scopes through the Teams Developer Portal. Do I still need to use Microsoft Graph APIs, or will this method handle everything?
Also, when calling this method, I noticed that one channel (the “General” channel) is missing from the response. What’s the best way to fetch a complete list of members and channels in a team where my bot is installed, especially since users are interacting with it in personal DMs?
{
“name”: undefined,
“id”: “19:nGtWIyKBcs0m93LgdScfymNX4_YhoaEj0Zo1@thread.tacv2”
},
{
“name”: “newchannel”,
“id”: “19:42baf94a1a3e86cb0@thread.tacv2”
},
{
“name”: “testchannel”,
“id”: “19:54b4ac2af6228c4573fff12@thread.tacv2”
}
]
Hi,I’m working on building a Microsoft Teams bot and came across the TeamsInfo.getTeamChannels(turnContext, teamId) method in the BotBuilder SDK. Could you help clarify how it works? Specifically, how does turnContext return data for a team? I’ve already assigned all the necessary scopes through the Teams Developer Portal. Do I still need to use Microsoft Graph APIs, or will this method handle everything?Also, when calling this method, I noticed that one channel (the “General” channel) is missing from the response. What’s the best way to fetch a complete list of members and channels in a team where my bot is installed, especially since users are interacting with it in personal DMs? [
{
“name”: undefined,
“id”: “19:nGtWIyKBcs0m93LgdScfymNX4_YhoaEj0Zo1@thread.tacv2”
},
{
“name”: “newchannel”,
“id”: “19:42baf94a1a3e86cb0@thread.tacv2”
},
{
“name”: “testchannel”,
“id”: “19:54b4ac2af6228c4573fff12@thread.tacv2”
}
] Read More