使用 Bicep 将 MsTeams 通道添加到 Azure 机器人资源

问题描述 投票:0回答:1

尝试将 MSTeams 通道添加到我的部署中时,我收到 CHANNEL_NOT_SUPPORTED 错误。

我使用的二头肌看起来像这样。

resource azureBot 'Microsoft.BotService/botServices@2021-03-01' = {
  name: botName
  location: location
  kind: 'azurebot'
  sku: azureBotSku
  properties: {
    displayName: **
    iconUrl: **
    endpoint: **
    msaAppId: **
    msaAppTenantId: ** 
    msaAppMSIResourceId: **
    msaAppType: 'UserAssignedMSI'
    tenantId: tenantId
    luisAppIds: []
    schemaTransformationVersion: '1.3'
    isCmekEnabled: false
  }

  resource teamsChannel 'channels' = {
    name: 'TeamsChannel'
    kind: 'azureBot'
    properties: {
      channelName: 'MsTeamsChannel'
      properties: {
        acceptedTerms: true
        isEnabled: true
      }
    }
  }
}

我可以通过门户手动添加频道就可以了。

botframework microsoft-teams azure-bicep
1个回答
0
投票

当我尝试使用

resource teams
块时,我也收到了与您相同的错误。

因此,要将团队频道添加到机器人资源,请使用机器人服务资源下的

channelName
,如下所示。避免使用单独的团队资源块来添加它。

修改二头肌代码:

param location string = 'westus'
resource azureBot 'Microsoft.BotService/botServices@2023-09-15-preview' = {
  name: 'botNamejah'
  location: location
  kind: 'azurebot'
  properties: {
    displayName: 'newdisplay'
    msaAppId: 'axxxxx89'
    msaAppTenantId: 'xxxxx'
    msaAppMSIResourceId: '/subscriptions/xxx/resourceGroups/xxxx/providers/Microsoft.ManagedIdentity/userAssignedIdentities/newuser'
    endpoint: 'https://myrg.azure-api.net'
    msaAppType: 'UserAssignedMSI'
    tenantId: ''
    luisAppIds: []
    schemaTransformationVersion: '1.3'
    channelName: 'MsTeamsChannel'
    isCmekEnabled: false
  }
}

部署成功:

enter image description here

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.