Forum Discussion

JonnyBago82's avatar
JonnyBago82
Copper Contributor
Sep 16, 2024

MS Teams Visibility Context

Hi there, 

 

I am developing a Microsoft Teams bot application and am encountering an issue where the bot's visibility and functionality are not being restricted as specified in the app manifest. Here are the details of the problem.

 

Issue Description:

  • Our bot is intended to be used only with the bot itself once sideloaded.
  • We have set the bot's scope in the manifest to "personal" only.
  • Despite this setting, the bot remains visible and functional in 1:1 chats, group chats and team channels.

Steps Taken:

  • Updated the manifest.json file to include only "personal" in the bot's scopes.

Expected Behaviour:

  • The bot should only be visible and functional in direct interactions with the bot.
  • Users should not be able to add or interact with the bot in 1:1 chats, group chats and team channels.

Questions:

  • Are there additional steps or configurations required to restrict a bot's visibility and functionality to direct bot contexts only?
  • Is there a known issue with the manifest scope settings not being enforced for bots?

Here is the manifest: 

 

{
   "$schema":"https://developer.microsoft.com/en-us/json-schemas/teams/v1.16/MicrosoftTeams.schema.json",
   "manifestVersion":"1.16",
   "version":"1.2.0",
   "id":"{{.AppID}}",
   "localizationInfo":{
      "defaultLanguageTag":"en-gb",
      "additionalLanguages":[
         
      ]
   },
   "developer":{
      "name":"REDACTED",
      "websiteUrl":"REDACTED",
      "privacyUrl":"REDACTED",
      "termsOfUseUrl":"REDACTED"
   },
   "icons":{
      "color":"color.png",
      "outline":"outline.png"
   },
   "name":{
      "short":"{{.AppName}}",
      "full":"{{.AppName}}"
   },
   "description":{
      "short":"REDACTED",
      "full":"REDACTED"
   },
   "accentColor":"#00bd00",
   "configurableTabs":[
      
   ],
   "staticTabs":[
      
   ],
   "bots":[
      {
         "botId":"{{.AppID}}",
         "scopes":[
            "personal"
         ],
         "needsChannelSelector":false,
         "isNotificationOnly":false,
         "supportsFiles":false,
         "supportsCalling":false,
         "supportsVideo":false,
         "commandLists":[
            {
               "scopes":[
                  "personal"
               ],
               "commands":[
                  
               ]
            }
         ]
      }
   ],
   "composeExtensions":[
      {
         "botId":"{{.AppID}}",
         "commands":[
            {
               "id":"REDACTED",
               "context":[
                  "commandBox",
                  "compose",
                  "message"
               ],
               "description":"REDACTED",
               "title":"REDACTED",
               "type":"action",
               "fetchTask":true
            }
         ]
      }
   ],
   "permissions":[
      "identity",
      "messageTeamMembers"
   ],
   "devicePermissions":[
      
   ],
   "validDomains":[
      "REDACTED",
      "REDACTED"
   ],
   "showLoadingIndicator":false,
   "isFullScreen":false,
   "activities":{
      
   },
   "defaultInstallScope":"personal"
}

 

 

Thanks.

  • Hi JonnyBago82,

    If I understand your scenario correctly, you are using a compose extension to trigger a form and create an adaptive card in the bot conversation.

    Even though you have to specify the bot ID in each section, Compose Extension and Bot are two different capabilities.

    Compose Extension is available wherever you can compose a message (1:1 conversation with a user, a bot, or a channel). You can’t restrict it to show up only in one conversation.

    If you want to trigger the form in the bot conversation, I think the best way is to use an action from an adaptive card and a dialog. You can find more information in this documentation

  • JonnyBago82 - Thanks for reporting your issue. We are not quite clear on this issue. Could you please share the repro video to get clarity on this issue?
    • JonnyBago82's avatar
      JonnyBago82
      Copper Contributor

      Hi Nivedipa-MSFT 

       

      Thanks for coming back to me.

      If you look at the screenshot below, you will see what I mean.

      I want users to only interact with OneHub (dev) via the app/bot on the left (OneHub).

       

       

      I don't want users to be able to trigger the bot from within a chat (see screenshot below of a 1:1 chat with my colleague Robert). 

       

      Is this possible?

      Thanks.

       

Resources