0
votes

I'm new to Microsoft Bot and Microsoft teams. I'm working on Bot Framework 4.9 and I need to show some text message to the Microsoft teams channel while the Bot is getting installed programmatically to the teams channel for the very first time.

I did not find clear information in Microsoft documents, what event is triggered when a Microsoft Bot is installed to a Microsoft Teams?

Thanks in advance!

1
Thank you for reaching out to us We will investigate and if we require further information we will reach out. Best regards, Teams PlatformTrinetra-MSFT
@Trinetra-MSFT Please let me know if you have any specific update.MarsRoverII
Please take a look at Bot Events sent when a member is added or Bot added in TeamsTrinetra-MSFT

1 Answers

1
votes

The conversationUpdate event with the membersAdded object in the payload is sent when either a bot is added to a team or a new user is added to a team where a bot has been added. Microsoft Teams also adds eventType.teamMemberAdded in the channelData object [1]

Using this event you can access users data(name, email) if needed.

However when your bot gets initialized/called to a user(personal context) conversationupdate gets called again, you're probably passing user state as an argument like this : BOT = WelcomeUserBot(USER_STATE) This user state itself is storing all the memory/conversation data of the bot MEMORY = MemoryStorage(); USER_STATE = UserState(MEMORY)

Tldr; conversationupdate event within membersAdded object is the answer