【问题标题】:Getting error while setting up tabs in Microsoft teams在 Microsoft 团队中设置选项卡时出错
【发布时间】:2019-07-01 21:18:15
【问题描述】:

在 ms 团队中设置选项卡时出现以下错误,

无法保存“我的标签”标签的配置

检查网络,https://amer.ng.msg.teams.microsoft.com/v1/threads/19%3Ac05017f762dd44458a82bb57d6a855d9%40thread.skype/properties?name=tab%3A%393844f6095537dd7c51d3ad

请求方法:PUT

此请求已返回以下响应,

{"errorCode":201,"message":"Failure due to: InvalidParameter."}

找不到与此相关的任何文档。

谁能帮我解决这个问题?

提前致谢。

【问题讨论】:

  • 您能否提供更多信息,您的链接似乎也无法正常工作。
  • 在设置选项卡时,当我们单击保存按钮时,会出现上述错误。您还需要什么其他信息,请告诉我
  • @Shivangi Srivastava 您能否确认您是否已为config tab 提供了所有必需的参数,并且您的标签符合requirements
  • @Gousia-MSFT 下面我分享了我的配置文件和清单文件。
  • 您能否在 setsettings() 方法本身中使用有效的 https url 设置 contenturl 值。请参考example。同时确保没有空格并添加了所有必填字段。

标签: microsoft-teams


【解决方案1】:

下面是选项卡配置代码:

microsoftTeams.settings.setValidityState(true);
microsoftTeams.settings.registerOnSaveHandler(saveEvent => {
  const origin = window.location.origin;
  const contentUrl = `${origin}/teams/index.html`;
  microsoftTeams.settings.setSettings({
    entityId: 'example.teams.teamcontext',
    contentUrl,
    suggestedDisplayName: 'test data',
  });
  saveEvent.notifySuccess();  

Manifest.json

{
  "$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.5/MicrosoftTeams.schema.json",
  "manifestVersion": "1.5",
  "version": "1.1.0",
  "id": "f1369b33-bdde-4587-908f-ttt",
  "packageName": "com.example.teams",
  "developer": {
    "name": "Test Example",
    "websiteUrl": "https://www.example.com",
    "privacyUrl": "https://www.example.com/corp/privacy-policy/",
    "termsOfUseUrl": "https://www.example.com/corp/terms-of-service/"
  },
  "name": {
    "short": "Test Example",
    "full": "Test Example"
  },
  "description": {
    "short": "Test Example",
    "full": ""
  },
  "icons": {
    "outline": "",
    "color": ""
  },
  "accentColor": "#FFFFFF",
  "configurableTabs": [{
    "configurationUrl": "https://example.serveo.net/teams/index.html#/teams-configure",
    "canUpdateConfiguration": true,
    "scopes": [
      "team"
    ]
  }],
  "staticTabs": [{
    "entityId": "com.example.teams",
    "name": "Test Example",
    "contentUrl": "https://example.serveo.net/teams/index.html",
    "scopes": [
      "personal"
    ]
  }],
  "bots": [{
    "botId": "d564-403f-8039-d0834b8a",
    "needsChannelSelector": false,
    "isNotificationOnly": false,
    "commandLists":[
      {
        "scopes": [
          "personal"
        ],
        "commands": [
          {
            "title": "/ti",
            "description": "Get your Todays Insigts set of cards"
          },
      }
    ],
    "scopes": [
      "team",
      "personal"
    ]
  }],
  "permissions": [],
  "validDomains": ["www.yandex.ru", "www.google.ru", "bash.org.ru", "*.example.com", "*.example.eu"]
}

【讨论】:

  • 基本解决了渠道问题。当我创建一个新频道并在其上配置一个选项卡时,它可以正常工作
猜你喜欢
  • 2019-02-22
  • 1970-01-01
  • 1970-01-01
  • 2019-03-11
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-06-20
  • 1970-01-01
相关资源
最近更新 更多