Microsoft Teams 传入 Webhook 按钮 \w 文件-Link
Microsoft Teams Incoming Webhook Button \w File-Link
我正在使用传入的 webhook 向 Microsoft Teams 频道发送消息。这工作得很好,除了按钮 "Open log" 应该通过浏览器打开文件但根本没有。
JSON
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "Error Log",
"sections": [{
"activityTitle": "Error in integration " + integration_name,
"activitySubtitle": "live stage",
"markdown": True,
"text": message
}],
"potentialAction": [{
"@type": "ActionCard",
"name": "Open log",
"actions": [{
"@type": "OpenUri",
"name": "Open log",
"targets": [{
"os": "default",
"uri": "file://someserver/d$/somefolder/logs/" + logname
}]
}]
}]
}
这个 webhook 调用的结果如下所示:
Message via webhook
我的问题是,这个按钮完全没有任何作用。如果我使用标准网站,即使是 android/iOS 个 URL,它也会像预期的那样工作。
非常感谢任何解决此问题的帮助!难道我做错了什么? Microsoft Teams 是否阻止了 file:// 链接?
是的,目前我们清理(阻止)file:// 链接,因为它们是一个非常重要的安全漏洞(例如本地 executables/batch 文件)。有关详细信息,请参阅 here。
也就是说,您的用例似乎既有效又安全。您希望它如何在安全的情况下工作?
难道真的没有办法创建一个包含 link 指向像 file://myshare/file.htm 这样的文件的 webhook 消息吗?
我们 post 使用 webhook 发送消息,我们还希望能够 post link 发送到我们公司的内联网中。
我正在使用传入的 webhook 向 Microsoft Teams 频道发送消息。这工作得很好,除了按钮 "Open log" 应该通过浏览器打开文件但根本没有。
JSON
{
"@type": "MessageCard",
"@context": "http://schema.org/extensions",
"themeColor": "0076D7",
"summary": "Error Log",
"sections": [{
"activityTitle": "Error in integration " + integration_name,
"activitySubtitle": "live stage",
"markdown": True,
"text": message
}],
"potentialAction": [{
"@type": "ActionCard",
"name": "Open log",
"actions": [{
"@type": "OpenUri",
"name": "Open log",
"targets": [{
"os": "default",
"uri": "file://someserver/d$/somefolder/logs/" + logname
}]
}]
}]
}
这个 webhook 调用的结果如下所示: Message via webhook
我的问题是,这个按钮完全没有任何作用。如果我使用标准网站,即使是 android/iOS 个 URL,它也会像预期的那样工作。
非常感谢任何解决此问题的帮助!难道我做错了什么? Microsoft Teams 是否阻止了 file:// 链接?
是的,目前我们清理(阻止)file:// 链接,因为它们是一个非常重要的安全漏洞(例如本地 executables/batch 文件)。有关详细信息,请参阅 here。
也就是说,您的用例似乎既有效又安全。您希望它如何在安全的情况下工作?
难道真的没有办法创建一个包含 link 指向像 file://myshare/file.htm 这样的文件的 webhook 消息吗? 我们 post 使用 webhook 发送消息,我们还希望能够 post link 发送到我们公司的内联网中。