I am facing an issue with the getTeamMembers() method while trying to identify which members are admins in a private team. Even though I am logged in as an admin, the userRole value always shows as "user". Can anyone assist me with this problem?
import { BotDeclaration, } from "express-msteams-host";
import {
ActionTypes,
CardFactory, MemoryStorage, MessageFactory,
TeamsActivityHandler, TaskModuleTaskInfo,
TurnContext, TaskModuleRequest, TaskModuleResponse, TeamsInfo
} from "botbuilder";
import * as Util from "util";
const TextEncoder = Util.TextEncoder;
@BotDeclaration(
"/api/messages",
new MemoryStorage(),
process.env.MICROSOFT_APP_ID,
process.env.MICROSOFT_APP_PASSWORD)
export class LearningTeamsBot extends TeamsActivityHandler {
constructor() {
super();
// create handlers
this.onMessage(async (context, next) => {
console.log(await TeamsInfo.getTeamMembers(context))