Microsoft Teams Bot - 用户无法发起对话
Microsoft Teams Bot - User cannot initiate conversation
我们有一个旁加载的 Microsoft Teams 机器人(称为 Axel),完全可以运行并且 运行 正在生产中。机器人能够发送消息(包括主动)、接收消息等
但是,用户无法发起与机器人的对话——机器人必须先发送消息才能工作。我相信这不是预期/期望的行为。在搜索选项卡中搜索机器人时,我们找到了它,但是当点击它的名字时没有任何反应。
我们如何才能让用户发起与机器人的对话?
编辑:这是我们编辑过的 manifest.json 文件
{
"$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}"
]
}
范围翻译:
- 接收来自我的消息和数据
- 向我发送消息和通知
- 访问个人资料信息
- 在频道中接收来自用户的消息和数据
- 在频道中发送消息和通知访问团队信息
您的机器人只启用了 "team" 作用域。
- 在 App Studio 中打开您的
manifest.json
。
- 转到“机器人”部分
- 单击编辑
- 启用个人范围
或者,您可以手动添加范围,然后 re-sideload/publish 您的机器人。
{
"$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}"
]
}
此外,请确保您已启用 Teams 频道,方法是:
- Azure 门户
- 您的资源组
- 您的 Web App Bot 或 Bot Channels 注册服务
- 频道
- 启用 Teams 频道
我们有一个旁加载的 Microsoft Teams 机器人(称为 Axel),完全可以运行并且 运行 正在生产中。机器人能够发送消息(包括主动)、接收消息等
但是,用户无法发起与机器人的对话——机器人必须先发送消息才能工作。我相信这不是预期/期望的行为。在搜索选项卡中搜索机器人时,我们找到了它,但是当点击它的名字时没有任何反应。
我们如何才能让用户发起与机器人的对话?
编辑:这是我们编辑过的 manifest.json 文件
{
"$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}"
]
}
范围翻译:
- 接收来自我的消息和数据
- 向我发送消息和通知
- 访问个人资料信息
- 在频道中接收来自用户的消息和数据
- 在频道中发送消息和通知访问团队信息
您的机器人只启用了 "team" 作用域。
- 在 App Studio 中打开您的
manifest.json
。 - 转到“机器人”部分
- 单击编辑
- 启用个人范围
或者,您可以手动添加范围,然后 re-sideload/publish 您的机器人。
{
"$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}"
]
}
此外,请确保您已启用 Teams 频道,方法是:
- Azure 门户
- 您的资源组
- 您的 Web App Bot 或 Bot Channels 注册服务
- 频道
- 启用 Teams 频道