Botframework-sdk: onTeamsMembersAddedEvent not working in botbuilder js sdk

Created on 17 Sep 2020  路  6Comments  路  Source: microsoft/botframework-sdk

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

"botbuilder": "~4.9.0" and "botbuilder": "~4.10.0"

Describe the bug

The official CoreBot project template has a welcome message implemented . But we tested both onMembersAdded and onTeamsMembersAddedEvent is not triggerred when new teams member first open a conversation with bot.

When user send a message to the bot both onMessage and onTeamsMembersAdded are triggerd at the same time.

To Reproduce

Steps to reproduce the behavior:

  1. New teams member open a link to chat with bot for the first time. He has never opened chat bot before.
  2. There is no welcome message sent to user.

Expected behavior

Bot send a welcome message to teams member.

Screenshots

Additional context

Tracking Status

Javascript SDK TODO

  • [ ] PR
  • [ ] Merged
Teams Bot Services bug customer-replied-to customer-reported needs-triage

Most helpful comment

Met the same issue, both onTeamsMembersAddedEvent and onMemberAdded event can not work, can anyone take a look ?

All 6 comments

Met the same issue, both onTeamsMembersAddedEvent and onMemberAdded event can not work, can anyone take a look ?

Thank you for reporting - could one of you supply us a botId and an approximate timestamp for when the message was missed so we can investigate in our logs further?

Yes, the bot id is : af941359-c07e-42c8-9de2-52af0b06e6a1 , the approximate timestamp is one hour before we left the comment, around Sep 17, 2020, 5:00 PM GMT+8.

@Way911 , could you please clarify how is the app installed in Teams? Are you uploading the manifest for the tenant or for the user? Trying to understand what does exactly this mean:
_New teams member open a link to chat with bot for the first time. He has never opened chat bot before._

We didn't install the app in Teams. We connected Team channel by following instructions.
https://docs.microsoft.com/en-us/azure/bot-service/channel-connect-teams?view=azure-bot-service-4.0
User open bot by this link : https://teams.microsoft.com/l/chat/0/0?users=28:af941359-c07e-42c8-9de2-52af0b06e6a1

Ah, ok. this is the expected behavior then. As is outlined at the top of the doc page you linked to, this isn't really recommended for use in production systems. The recommended path is to install your bot as part of an app - that will cause the event to fire at install time. When deep-linking directly to the chat with your bot the event will not fire until the user interacts with the bot.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mattlanham picture mattlanham  路  3Comments

Vigneshramkumar picture Vigneshramkumar  路  3Comments

RaoVenka picture RaoVenka  路  3Comments

vaditya04 picture vaditya04  路  3Comments

peterbozso picture peterbozso  路  3Comments