Konrad
Konrad

Reputation: 902

Microsoft Teams Bot - User cannot initiate conversation

We have a sideloaded Microsoft Teams bot (called Axel), fully operational and running in production. The bot is able to send messages (including proactive), receive messages, etc.

However, users cannot initiate a conversation with the bot -- the bot MUST send a message first for it to work. I believe this is not expected / desired behavior. When searching for the bot in the search tab, we find it, but when clicking on its name nothing happens.

How can we make it possible for users to initiate conversations with the bot?

Screenshot

Edit: here is our redacted manifest.json file

{
    "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json",
    "manifestVersion": "1.3",
    "version": "1.0.0",
    "id": "{app_id}",
    "packageName": "com.package.name",
    "developer": {
        "name": "HeyAxel",
        "websiteUrl": "https://heyaxel.com",
        "privacyUrl": "https://www.heyaxel.com/files/Privacy_Policy.pdf",
        "termsOfUseUrl": "https://www.heyaxel.com/files/Privacy_Policy.pdf"
    },
    "icons": {
        "color": "color.png",
        "outline": "outline.png"
    },
    "name": {
        "short": "Axel",
        "full": "Axel"
    },
    "description": {
        "short": "shortdesc",
        "full": "fulldesc"
    },
    "accentColor": "#F9F9FA",
    "bots": [
        {
            "botId": "{bot_id}",
            "scopes": [
                "team"
            ],
            "supportsFiles": true,
            "isNotificationOnly": false
        }
    ],
    "permissions": [
        "identity",
        "messageTeamMembers"
    ],
    "validDomains": [
        "{domain1}",
        "{domain2}"
    ]
}

The bot in the Teams > Apps tab

Scopes & permissions displayed to users

Translation of scopes:

Upvotes: 1

Views: 1728

Answers (1)

mdrichardson
mdrichardson

Reputation: 7241

Your bot only has the "team" scope enabled.

  1. Open your manifest.json in App Studio.
  2. Go to the Bots section
  3. Click Edit
  4. Enable the Personal scope

enter image description here

Alternatively, you can just add the scope manually, then re-sideload/publish your bot.

{
    "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json",
    "manifestVersion": "1.3",
    "version": "1.0.0",
    "id": "{app_id}",
    "packageName": "com.package.name",
    "developer": {
        "name": "HeyAxel",
        "websiteUrl": "https://heyaxel.com",
        "privacyUrl": "https://www.heyaxel.com/files/Privacy_Policy.pdf",
        "termsOfUseUrl": "https://www.heyaxel.com/files/Privacy_Policy.pdf"
    },
    "icons": {
        "color": "color.png",
        "outline": "outline.png"
    },
    "name": {
        "short": "Axel",
        "full": "Axel"
    },
    "description": {
        "short": "shortdesc",
        "full": "fulldesc"
    },
    "accentColor": "#F9F9FA",
    "bots": [
        {
            "botId": "{bot_id}",
            "scopes": [
                "team",
                "personal",
                "groupchat"
            ],
            "supportsFiles": true,
            "isNotificationOnly": false
        }
    ],
    "permissions": [
        "identity",
        "messageTeamMembers"
    ],
    "validDomains": [
        "{domain1}",
        "{domain2}"
    ]
}

Also, be sure that you've enabled the Teams Channel by going to:

  1. Azure Portal
  2. Your Resource Group
  3. Your Web App Bot or Bot Channels Registration Service
  4. Channels
  5. Enable the Teams Channel

enter image description here

Upvotes: 2

Related Questions