You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

部署到Kubernetes后Microsoft Teams应用UI不显示但控制台有日志

问题描述

我使用TypeScript React构建了一个自定义Microsoft Teams应用,并将其部署在Kubernetes(K8s)Pod中。将清单上传到Microsoft Teams后,我在UI中看不到该应用。但在检查Teams控制台日志(按F12)时,能看到来自应用的日志,说明它正在后台加载。

本地运行应用时一切正常。

Manifest.json

{
  "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.19/MicrosoftTeams.schema.json",
  "manifestVersion": "1.19",
  "version": "1.2.0",
  "id": "32e8e5ff-cfee-4782-a059-7e0ed215a3a4",
  "developer": {
    "name": "ExampleB.V",
    "websiteUrl": "https://example.com/",
    "privacyUrl": "https://example.com/privacy-statement/",
    "termsOfUseUrl": "https://example.com/privacy-statement/"
  },
  "staticTabs": [
    {
      "entityId": "index",
      "name": "Home",
      "contentUrl": "https://example.com/index.html#/tab",
      "websiteUrl": "https://example.com/index.html#/tab",
      "scopes": ["personal", "groupChat", "team"]
    }
  ],
  "validDomains": [
    "*.example.com",
    
  ],
  "webApplicationInfo": {
    "id": "32e8e5ff-cfee-4782-a059-7e0ed215a3a4",
    "resource": "api://example.com/32e8e5ff-cfee-4782-a059-7e0ed215a3a4"
  }
}

已尝试的操作

  • ✅ 检查Teams控制台日志(F12):能看到应用的日志,但UI未显示。
  • ✅ 验证HTTPS访问:在浏览器中打开https://example.com/index.html#/tab时,应用加载正常。
  • ✅ 将域名添加到validDomains:example.com已在列表中。
  • ✅ 检查CSP错误(Teams控制台中按F12):没有明确的CSP错误,但不确定是否因iframe限制被拦截。
  • ✅ 检查Kubernetes部署与Service:Pod运行正常,日志显示请求已到达服务器。

可能的问题与疑问

  1. Microsoft Teams是否因iframe安全策略拦截了我的应用?
    • 是否需要在Content-Security-Policy头中明确允许https://teams.microsoft.com?
  2. 我的Kubernetes Ingress配置是否缺失内容?
    • 如何确认Service在Kubernetes内部是否正确路由流量?
  3. webApplicationInfo.resource是否存在问题?
    • 该值是否会影响应用在Teams中的可见性?
  4. 渲染静态标签页是否需要特定的Teams权限?

内容的提问来源于stack exchange,提问作者Ahmed

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.13 20:53:13