Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter MessagingExtensionQuery always returns just first CommandId from manifest #6465

Open
harald-thoenig opened this issue Sep 5, 2022 · 12 comments
Assignees
Labels
Area: Teams The issue is related to Teams support blocked Current progress is blocked on something else. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report.

Comments

@harald-thoenig
Copy link

I'm using Microsoft Bot Framework V4 SDK to create a messaging extension bot.

I created two commands (searchQuery, processQuery). I would like to call up a configuration page for each command. The problem is that the MessagingExtensionQuery parameter in the OnTeamsMessagingExtensionConfigurationQuerySettingUrlAsync event always returns just the first command Id, I entered in the manifest.

I would have expected that when I click on the 3 dots to open the configuration page, the respective ID of the command would be passed to the event.

Messaging extension bot
ConfigurationPage
Manifest

Hope you can help.
regads

@harald-thoenig harald-thoenig added bug Indicates an unexpected problem or an unintended behavior. needs-triage The issue has just been created and it has not been reviewed by the team. labels Sep 5, 2022
@ramfattah ramfattah added customer-reported Issue is created by anyone that is not a collaborator in the repository. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. labels Sep 6, 2022
@dmvtech dmvtech self-assigned this Sep 7, 2022
@dmvtech
Copy link
Collaborator

dmvtech commented Sep 7, 2022

I am taking a look at this.

@dmvtech dmvtech removed the needs-triage The issue has just been created and it has not been reviewed by the team. label Sep 7, 2022
@DridiFathi
Copy link

@dmvtech any update on this?

@dmvtech
Copy link
Collaborator

dmvtech commented Sep 20, 2022

Hi @harald-thoenig @DridiFathi

Apologies for the delay. We are still investigating.

@dmvtech dmvtech added the customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. label Sep 28, 2022
@dmvtech
Copy link
Collaborator

dmvtech commented Sep 29, 2022

Hi @harald-thoenig

To clarify the behavior a bit. When you say:

when I click on the 3 dots to open the configuration page

Do you mean; when you click on the three dots? Or when you select settings:
image

If you could please share more information and specifics on how exactly you set up the configuration/configuration page.

@dmvtech
Copy link
Collaborator

dmvtech commented Sep 29, 2022

@ramfattah

@harald-thoenig
Copy link
Author

Hi @ramfattah
If I select settings the event OnTeamsMessagingExtensionConfigurationQuerySettingUrlAsync will be triggered. In this event I get the command Id. But this command Id is always the first command Id from manifest. But I like to know on which command the user has selected the settings, then I could provide users different configuration pages per command Id.
I did the implementation of the configuration page exactly as it is described in the git sample "https://github.com/microsoft/BotBuilder-Samples/tree/main/samples/csharp_dotnetcore/50.teams-messaging-extensions-search/Bots)".

@ramfattah
Copy link
Contributor

Thanks @harald-thoenig,

I was able to reproduce this issue using C# bot sample 52.teams-messaging-extensions-search-auth-config.

Sharing the steps to reproduce:

  1. Clone sample 52.teams-messaging-extensions-search-auth-config into your local environment.
  2. In file manifest.json, replace the commands section with the following:
     "name": {
       "short": "Messaging Extension Auth",
       "full": "ME Auth for Search, Action and link unfurling"
     },
     "description": {
       "short": "ME Authentication for Search, Action and Link unfurling",
       "full": "ME Authentication sample code for all authentication merged"
     },
     "accentColor": "#FFFFFF",
     "composeExtensions": [
       {
         "botId": "<<YOUR-MICROSOFT-APP-ID>>",
         "canUpdateConfiguration": true,
    +      "commands": [
    +        {
    +          "id": "searchQuery",
    +         "type": "query",
    +          "title": "Search",
    +          "description": "Perform a search",
    +          "initialRun": false,
    +          "fetchTask": false,
    +          "context": [
    +            "commandBox",
    +            "compose",
    +            "message"
    +          ],
    +          "parameters": [
    +            {
    +              "name": "searchQuery",
    +              "title": "Search",
    +              "description": "Your search query",
    +              "inputType": "text"
    +            }
    +          ]
    +        },
    +        {
    +          "id": "processQuery",
    +          "type": "query",
    +          "title": "Tasks",
    +          "description": "Task lists",
    +          "initialRun": true,
    +          "fetchTask": false,
    +          "context": [
    +           "commandBox",
    +            "compose",
    +            "message"
    +          ],
    +          "parameters": [
    +            {
    +              "name": "processQuery",
    +              "title": "Process",
    +              "description": "ProcessList",
    +              "inputType": "text"
    +            }
    +          ]
    +        },
    +        {
    +          "id": "SignOutCommand",
    +          "type": "action",
    +          "title": "Sign Out",
    +          "description": "Sign out from authenticated services.",
    +          "initialRun": false,
    +          "fetchTask": true,
    +          "context": [
    +            "commandBox",
    +            "compose"
    +          ],
    +          "parameters": [
    +            {
    +              "name": "param",
    +              "title": "param",
    +              "description": ""
    +            }
    +          ]
    +        }
    +      ],
         "messageHandlers": [
           {
             "type": "link",
             "value": {
               "domains": [
                 "*.botframework.com"
               ]
             }
           }
         ]
       }
     ],
     "permissions": [
       "identity"
     ],
     "validDomains": [
       "*.githubusercontent.com",
       "*.ngrok.io",
       "*.botframework.com"
     ]
    }
    
    • Notice we have 3 command ids: searchQuery, processQuery, and SignOutCommand
  3. Install and Run the bot in Teams channel. From my end, I set up ngrok tunneling solution.
  4. In the bot sample code, put break point on method OnTeamsMessagingExtensionConfigurationQuerySettingUrlAsync
  5. In Teams, at the top nav search bar, @ mention the Messaging Extension Auth app.
  6. Select Tasks, and at the bottom right of the drop down, click the three dots ...
    1055ebf9eedf527b166e791490ef0fef
  7. Notice the MessagingExtensionQuery query parameter in method OnTeamsMessagingExtensionConfigurationQuerySettingUrlAsync always returns the first command Id searchQuery instead of processQuery.
    image

@dmvtech dmvtech assigned JuanAr and unassigned dmvtech Oct 7, 2022
@ramfattah
Copy link
Contributor

Hey @JuanAr, we are reaching out to see if there is status update on this.

Thanks.

@JuanAr
Copy link
Collaborator

JuanAr commented Oct 12, 2022

Hey @JuanAr, we are reaching out to see if there is status update on this.

Thanks.

Hi @ramfattah, this issue is on our backlog. We'll be tackling it next week.
Thanks.

@ceciliaavila
Copy link
Collaborator

We reproduced the issue and found that it's the MSTeams client the one sending the wrong commandId in the property value of the activity (documentation here).
We consider this issue can be closed as there's nothing to fix on the SDK.

@ramfattah
Copy link
Contributor

Thank you @ceciliaavila.
Closing as this issue is not related to Bot Framework SDK.

@tracyboehrer tracyboehrer added the ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report. label Oct 18, 2022
@tracyboehrer
Copy link
Member

Reopening, will notify Teams during sync meetings.

@tracyboehrer tracyboehrer reopened this Oct 18, 2022
@tracyboehrer tracyboehrer added Area: Teams The issue is related to Teams support blocked Current progress is blocked on something else. labels Oct 18, 2022
@tracyboehrer tracyboehrer assigned tracyboehrer and unassigned JuanAr Oct 18, 2022
@tracyboehrer tracyboehrer assigned JuanAr and unassigned tracyboehrer Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Teams The issue is related to Teams support blocked Current progress is blocked on something else. Bot Services Required for internal Azure reporting. Do not delete. Do not change color. bug Indicates an unexpected problem or an unintended behavior. customer-replied-to Indicates that the team has replied to the issue reported by the customer. Do not delete. customer-reported Issue is created by anyone that is not a collaborator in the repository. ExemptFromDailyDRIReport Use this label to exclude the issue from the DRI report.
Projects
None yet
Development

No branches or pull requests

7 participants