Forum Discussion
Teams Notification Bot: TeamsInfo.getPagedMembers is sometimes not returning newly added members
Hi, yes we still need help with this issue. Here is some additional information that you asked for:
1) These users are being added to the channel after the bot has been installed
2) The bot is detecting some users, but not all. See the following screenshots for our tenant, where I checkmarked the users being detected:
ā
The users marked in red are the ones not being detected by the bot, and the blue ones are being detected. The way we create users is:
- Create a new user in admin.microsoft.com
- Add this new user to a MS Teams team/channel as an admin
The only difference between the working and non-working users is that the working ones we added a while back, and the non-working ones are all new users from us trying to reproduce the issue.
To confirm, here is my backend code, printing out the resulting list "members" confirms that only the 3 checkmarked emails are being detected:
const members = [];
do {
var pagedMembers = await TeamsInfo.getPagedMembers(context, 100, continuationToken);
continuationToken = pagedMembers.continuationToken;
members.push(...pagedMembers.members.filter(m => !!m.email));
}
while (continuationToken !== undefined);
I will keep you posted.