botframeworkmicrosoft-teams

Teams V2 messaging extension started from commandbox has no context (URL placeholder are not replaced with values)


i have a problem with my existing Teams messaging extension in Teams V2. With the old teams everything runs perfectly.

I have a messaging extension using the Bot Framework. Actions are defined which can be triggered from message and command box. On my server I did override OnTeamsMessagingExtensionFetchTaskAsync and created a MessagingExtensionActionResponse with a URL that includes placeholders, like {groupId} and {channelId}.

The messaging extension works fine when I use the old teams client (web or windows app). But if I switch to Teams V2 the placeholders are only replaced with values when the messaging extension is triggered from the message. If it is triggered from commandbox the placeholders are not replaced.

Does anyone has the same behaviour and/or a solution for this problem?

Hope to hear from you, Anne


UPDATE:

The original URL looks like this with placeholders: https://Server/MyApp/Documents?TeamsGroupId={groupId}&TeamName={teamName}&Culture={locale}&theme={theme}&TeamsChannelId={channelId}

If I start an action commmand from command box in Teams V2 only theme and culture palceholders are replaced: https://Server/MyApp/Documents?TeamsGroupId={groupId}&TeamName={teamName}&Culture=en-us&theme=default&TeamsChannelId={channelId}

If I start from the message in Teams V2 all placeholders are replaced (I just changed the IDs a bit ;) ): https://Server/MyApp/Documents?TeamsGroupId=aaaaaaaa-6666-4444-9ca9-9c210a6599da&TeamName=Projekt-Team&Culture=en-us&theme=default&TeamsChannelId=19%3A11268b3aa666666c9eac093592b43fb6%40thread.skype


Solution

  • For all those who want to know how it ended:

    The MS Engineering team said that Commandbox or search bar is a personal scope and will never have any context. This is an expected behavior. It could have been a bug in the old Teams which is fixed now.

    see also: https://github.com/MicrosoftDocs/msteams-docs/issues/11725